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/database') 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