diff options
author | xue <> | 2006-11-24 19:15:26 +0000 |
---|---|---|
committer | xue <> | 2006-11-24 19:15:26 +0000 |
commit | 7280a2301a3d3dd251d8302c3f7999fa09780d42 (patch) | |
tree | 4436f61f268a79271ccf7c01fdab7a5be5c50106 /tests/unit/Data/TDbConnectionTest.php | |
parent | 88a073ccbb0026e52d2f83aeeaab4bd9591ef3ab (diff) |
bug fixes of data layer.
Diffstat (limited to 'tests/unit/Data/TDbConnectionTest.php')
-rw-r--r-- | tests/unit/Data/TDbConnectionTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/Data/TDbConnectionTest.php b/tests/unit/Data/TDbConnectionTest.php index 21d6730b..6c1e71aa 100644 --- a/tests/unit/Data/TDbConnectionTest.php +++ b/tests/unit/Data/TDbConnectionTest.php @@ -38,12 +38,23 @@ class TDbConnectionTest extends PHPUnit2_Framework_TestCase $this->_connection2->Active=true; $this->assertTrue($this->_connection2->Active); $pdo=$this->_connection2->PdoInstance; + $this->assertTrue($pdo instanceof PDO); // test setting Active repeatedly doesn't re-connect DB $this->_connection2->Active=true; $this->assertTrue($pdo===$this->_connection2->PdoInstance); $this->_connection2->Active=false; $this->assertFalse($this->_connection2->Active); + + try + { + $connection=new TDbConnection('unknown:'.TEST_DB_FILE); + $connection->Active=true; + $this->fail('Expected exception is not raised'); + } + catch(TDbException $e) + { + } } public function testCreateCommand() |