summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2015-02-04 18:20:01 +0100
committerAhmad Anbar <aanbar@gmail.com>2015-02-04 18:20:01 +0100
commite5454f9b28f123a5549971f580255a065b2f8cc2 (patch)
treec4927e7b7afb0bf242976034630cc60f2f1db00f /tests/mocks
parent6db62ab0ad0e223806a1367e12b1884b48dc65d7 (diff)
parenteccac6e6a73a4d1a5b40f383ce64359c2c94ae12 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/core/security.php6
-rw-r--r--tests/mocks/database/schema/skeleton.php7
-rw-r--r--tests/mocks/libraries/encrypt.php4
-rw-r--r--tests/mocks/libraries/table.php4
4 files changed, 14 insertions, 7 deletions
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
+}
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);
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
+}
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
+}