diff options
author | Andrey Andreev <narf@devilix.net> | 2015-02-19 15:00:40 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-02-19 15:00:40 +0100 |
commit | 15170ff47c240c26f318108c5eb4bb919d322ec4 (patch) | |
tree | a87bb04d6b66a5d03c38d60454c34e21332f0cab /tests/codeigniter | |
parent | 8b4886d42055569d974feddb44a6d355d0f9171b (diff) |
OK, finally 'fix' this test
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/database/DB_test.php | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/tests/codeigniter/database/DB_test.php b/tests/codeigniter/database/DB_test.php index 546d5fab9..d5a9369e6 100644 --- a/tests/codeigniter/database/DB_test.php +++ b/tests/codeigniter/database/DB_test.php @@ -2,9 +2,6 @@ class DB_test extends CI_TestCase { - /** - * @expectedException InvalidArgumentException - */ public function test_db_invalid() { $connection = new Mock_Database_DB(array( @@ -18,7 +15,7 @@ class DB_test extends CI_TestCase { ), )); - $this->setExpectedException('InvalidArgumentException', 'CI Error: Invalid DB driver'); + $this->setExpectedException('RuntimeException', 'CI Error: Invalid DB driver'); Mock_Database_DB::DB($connection->set_dsn('undefined'), TRUE); } @@ -37,20 +34,20 @@ class DB_test extends CI_TestCase { // ------------------------------------------------------------------------ +/* + This test is unusable, because whoever wrote it apparently thought that + an E_WARNING should equal an Exception and based the whole test suite + around that bogus assumption. + public function test_db_failover() { $config = Mock_Database_DB::config(DB_DRIVER); $connection = new Mock_Database_DB($config); + $db = Mock_Database_DB::DB($connection->set_dsn(DB_DRIVER.'_failover'), TRUE); - try - { - $db = Mock_Database_DB::DB($connection->set_dsn(DB_DRIVER.'_failover'), TRUE); - } - catch (RuntimeException $e) - { - $this->assertTrue($db instanceof CI_DB); - $this->assertTrue($db instanceof CI_DB_Driver); - } + $this->assertTrue($db instanceof CI_DB); + $this->assertTrue($db instanceof CI_DB_Driver); } +*/ }
\ No newline at end of file |