From be09b88f9e1c946249dc429858e402a9eba4baa0 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 2 Sep 2007 17:31:03 +0000 Subject: [PATCH] tests for sqlite file-based dsn --- tests/ConnectionTestCase.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/ConnectionTestCase.php b/tests/ConnectionTestCase.php index 406b44fa4..b459f2499 100644 --- a/tests/ConnectionTestCase.php +++ b/tests/ConnectionTestCase.php @@ -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->getTransactionLevel(),0); } - - public function testNestedTransactions() + + public function testNestedTransactions() { $this->assertEqual($this->connection->transaction->getTransactionLevel(),0); $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->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'); + } }