From e7068ed2f0459b97346713dc7eb2cd761cb38950 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 20 Jan 2015 11:32:08 +0200 Subject: Ignore mysql_*connect() E_DEPRECATED errors in tests --- tests/mocks/database/schema/skeleton.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/mocks') diff --git a/tests/mocks/database/schema/skeleton.php b/tests/mocks/database/schema/skeleton.php index b6d4b7893..5fe5b0f30 100644 --- a/tests/mocks/database/schema/skeleton.php +++ b/tests/mocks/database/schema/skeleton.php @@ -24,6 +24,13 @@ class Mock_Database_Schema_Skeleton { { if (empty(self::$db) && empty(self::$forge)) { + // E_DEPRECATED notices thrown by mysql_connect(), mysql_pconnect() + // on PHP 5.5+ cause the tests to fail + if ($driver === 'mysql' && version_compare(PHP_VERSION, '5.5', '>=')) + { + error_reporting(E_ALL & ~E_DEPRECATED); + } + $config = Mock_Database_DB::config($driver); $connection = new Mock_Database_DB($config); $db = Mock_Database_DB::DB($connection->set_dsn($driver), TRUE); -- cgit v1.2.3-24-g4f1b From cb29049ea6d5a46fff032e15234b3a1b6c3bc54b Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 29 Jan 2015 10:21:55 -0500 Subject: fix typo in comments --- tests/mocks/core/security.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/mocks') diff --git a/tests/mocks/core/security.php b/tests/mocks/core/security.php index e19a8b20b..a21fc5cb3 100644 --- a/tests/mocks/core/security.php +++ b/tests/mocks/core/security.php @@ -10,13 +10,13 @@ class Mock_Core_Security extends CI_Security { return $this; } - // Overide inaccesible protected properties + // Override inaccessible protected properties public function __get($property) { return isset($this->{'_'.$property}) ? $this->{'_'.$property} : NULL; } - // Overide inaccesible protected method + // Override inaccessible protected method public function __call($method, $params) { if (is_callable(array($this, '_'.$method))) @@ -27,4 +27,4 @@ class Mock_Core_Security extends CI_Security { throw new BadMethodCallException('Method '.$method.' was not found'); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From 80b7a38c2a66f249bb6e21e8b238ea34023618d1 Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 29 Jan 2015 10:25:01 -0500 Subject: fix typo in comments --- tests/mocks/libraries/encrypt.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/mocks') diff --git a/tests/mocks/libraries/encrypt.php b/tests/mocks/libraries/encrypt.php index f1859398f..c14d1e02f 100644 --- a/tests/mocks/libraries/encrypt.php +++ b/tests/mocks/libraries/encrypt.php @@ -2,7 +2,7 @@ class Mock_Libraries_Encrypt extends CI_Encrypt { - // Overide inaccesible protected method + // Override inaccessible protected method public function __call($method, $params) { if (is_callable(array($this, '_'.$method))) @@ -13,4 +13,4 @@ class Mock_Libraries_Encrypt extends CI_Encrypt { throw new BadMethodCallException('Method '.$method.' was not found'); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From 5c9d905ad883cd4ab1c47652cd89f0c9b1f9fece Mon Sep 17 00:00:00 2001 From: Claudio Galdiolo Date: Thu, 29 Jan 2015 10:25:44 -0500 Subject: fix typo in comments --- tests/mocks/libraries/table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/mocks') diff --git a/tests/mocks/libraries/table.php b/tests/mocks/libraries/table.php index 87c278bce..08f80072a 100644 --- a/tests/mocks/libraries/table.php +++ b/tests/mocks/libraries/table.php @@ -2,7 +2,7 @@ class Mock_Libraries_Table extends CI_Table { - // Overide inaccesible protected method + // Override inaccessible protected method public function __call($method, $params) { if (is_callable(array($this, '_'.$method))) @@ -13,4 +13,4 @@ class Mock_Libraries_Table extends CI_Table { throw new BadMethodCallException('Method '.$method.' was not found'); } -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b