summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/database/DB_test.php23
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