1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/TransactionSqliteTestCase.php

26 lines
1.1 KiB
PHP

<?php
class Doctrine_Transaction_Oracle_TestCase extends Doctrine_Driver_UnitTestCase {
public function __construct() {
parent::__construct('sqlite');
}
public function testSetIsolationThrowsExceptionOnUnknownIsolationMode() {
try {
$this->transaction->setIsolation('unknown');
$this->fail();
} catch(Doctrine_Transaction_Exception $e) {
$this->pass();
}
}
public function testSetIsolationExecutesSql() {
$this->transaction->setIsolation('READ UNCOMMITTED');
$this->transaction->setIsolation('READ COMMITTED');
$this->transaction->setIsolation('REPEATABLE READ');
$this->transaction->setIsolation('SERIALIZABLE');
$this->assertEqual($this->adapter->pop(), 'PRAGMA read_uncommitted = 0');
$this->assertEqual($this->adapter->pop(), 'PRAGMA read_uncommitted = 1');
$this->assertEqual($this->adapter->pop(), 'PRAGMA read_uncommitted = 1');
$this->assertEqual($this->adapter->pop(), 'PRAGMA read_uncommitted = 1');
}
}