public function testDoubleBegin() { DB::begin(); try { DB::begin(); $this->fail('Expected an exception here.'); } catch (\Exception $e) { $this->assertContains("Already in transaction.", $e->getMessage()); } DB::rollback(); }