tests for sqlite file-based dsn
This commit is contained in:
parent
2dd52e306d
commit
be09b88f9e
@ -214,8 +214,8 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase
|
|||||||
$this->assertEqual($this->connection->transaction->getState(), Doctrine_Transaction::STATE_SLEEP);
|
$this->assertEqual($this->connection->transaction->getState(), Doctrine_Transaction::STATE_SLEEP);
|
||||||
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testNestedTransactions()
|
public function testNestedTransactions()
|
||||||
{
|
{
|
||||||
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
||||||
$this->connection->beginTransaction();
|
$this->connection->beginTransaction();
|
||||||
@ -231,4 +231,19 @@ class Doctrine_Connection_TestCase extends Doctrine_UnitTestCase
|
|||||||
$this->assertEqual($this->connection->transaction->getState(), Doctrine_Transaction::STATE_SLEEP);
|
$this->assertEqual($this->connection->transaction->getState(), Doctrine_Transaction::STATE_SLEEP);
|
||||||
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
$this->assertEqual($this->connection->transaction->getTransactionLevel(),0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testSqliteDsn()
|
||||||
|
{
|
||||||
|
$conn = Doctrine_Manager::connection('sqlite:foo.sq3');
|
||||||
|
|
||||||
|
try {
|
||||||
|
$conn->connect();
|
||||||
|
|
||||||
|
$conn->close();
|
||||||
|
$this->pass();
|
||||||
|
} catch (Doctrine_Exception $e) {
|
||||||
|
$this->fail();
|
||||||
|
}
|
||||||
|
unlink('foo.sq3');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user