mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Add unit tests for nested transaction support
This commit is contained in:
parent
7755821f20
commit
be97b3f5e5
1 changed files with 14 additions and 0 deletions
|
|
@ -99,6 +99,20 @@ class DBTest extends \Codeception\TestCase\Test
|
|||
$this->assertTrue($stmt->closeCursor());
|
||||
}
|
||||
|
||||
public function testTransaction()
|
||||
{
|
||||
$oDB = Rhymix\Framework\DB::getInstance();
|
||||
$this->assertEquals(0, $oDB->getTransactionLevel());
|
||||
$this->assertEquals(1, $oDB->beginTransaction());
|
||||
$this->assertEquals(1, $oDB->getTransactionLevel());
|
||||
$this->assertEquals(2, $oDB->begin());
|
||||
$this->assertEquals(2, $oDB->getTransactionLevel());
|
||||
$this->assertEquals(1, $oDB->rollback());
|
||||
$this->assertEquals(1, $oDB->getTransactionLevel());
|
||||
$this->assertEquals(0, $oDB->commit());
|
||||
$this->assertEquals(0, $oDB->getTransactionLevel());
|
||||
}
|
||||
|
||||
public function testAddPrefixes()
|
||||
{
|
||||
$oDB = Rhymix\Framework\DB::getInstance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue