From c576995304fc3609cca0b7b92d1b2cd611ec82f5 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 16 Jan 2019 17:49:35 +0200 Subject: [ci skip] 3.1.10 release --- tests/codeigniter/database/DB_test.php | 61 ---------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 tests/codeigniter/database/DB_test.php (limited to 'tests/codeigniter/database/DB_test.php') diff --git a/tests/codeigniter/database/DB_test.php b/tests/codeigniter/database/DB_test.php deleted file mode 100644 index 9d53fd6f2..000000000 --- a/tests/codeigniter/database/DB_test.php +++ /dev/null @@ -1,61 +0,0 @@ - array( - 'dsn' => '', - 'hostname' => 'undefined', - 'username' => 'undefined', - 'password' => 'undefined', - 'database' => 'undefined', - 'dbdriver' => 'undefined', - ), - )); - - $this->setExpectedException('RuntimeException', 'CI Error: Invalid DB driver'); - - Mock_Database_DB::DB($connection->set_dsn('undefined'), TRUE); - } - - // ------------------------------------------------------------------------ - - public function test_db_valid() - { - $config = Mock_Database_DB::config(DB_DRIVER); - $connection = new Mock_Database_DB($config); - - // E_DEPRECATED notices thrown by mysql_connect(), mysql_pconnect() - // on PHP 5.5+ cause the tests to fail - if (DB_DRIVER === 'mysql' && version_compare(PHP_VERSION, '5.5', '>=')) - { - error_reporting(E_ALL & ~E_DEPRECATED); - } - - $db = Mock_Database_DB::DB($connection->set_dsn(DB_DRIVER), TRUE); - - $this->assertInstanceOf('CI_DB', $db); - $this->assertInstanceOf('CI_DB_Driver', $db); - } - - // ------------------------------------------------------------------------ - -/* - 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); - - $this->assertInstanceOf('CI_DB', $db); - $this->assertInstanceOf('CI_DB_Driver', $db); - } -*/ - -} -- cgit v1.2.3-24-g4f1b