Beispiel #1
0
 function testTransactions()
 {
     $this->assertCount(3, User::all());
     \ORM\Model::beginTransaction();
     $this->createNewUser();
     \ORM\Model::rollback();
     $this->assertCount(3, User::all());
     \ORM\Model::beginTransaction();
     $this->assertTrue(\ORM\Model::inTransaction());
     $this->createNewUser();
     \ORM\Model::commit();
     $this->assertCount(4, User::all());
 }