summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Encryption_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-08-22 12:19:24 +0200
committerAndrey Andreev <narf@devilix.net>2016-08-22 12:19:24 +0200
commitc95df51c90dc9506ec9a37a43d87238965210550 (patch)
treefdb7acd49278d8294395a051d1577ede3defaecf /tests/codeigniter/libraries/Encryption_test.php
parent549a601bac3b1467168e0bb7b5642ba7fc59c35e (diff)
Skip mcrypt-related testcases on PHP 7.1
ext/mcrypt is deprecated and the test cases in question trigger E_DEPRECATED messages as a result.
Diffstat (limited to 'tests/codeigniter/libraries/Encryption_test.php')
-rw-r--r--tests/codeigniter/libraries/Encryption_test.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/codeigniter/libraries/Encryption_test.php b/tests/codeigniter/libraries/Encryption_test.php
index cbcae3133..96e52ada8 100644
--- a/tests/codeigniter/libraries/Encryption_test.php
+++ b/tests/codeigniter/libraries/Encryption_test.php
@@ -240,6 +240,10 @@ class Encryption_test extends CI_TestCase {
{
return $this->markTestSkipped('Cannot test MCrypt because it is not available.');
}
+ elseif (version_compare(PHP_VERSION, '7.1.0-alpha', '>='))
+ {
+ return $this->markTestSkipped('ext/mcrypt is deprecated since PHP 7.1 and will generate notices here.');
+ }
$this->assertTrue(is_resource($this->encryption->__driver_get_handle('mcrypt', 'rijndael-128', 'cbc')));
}
@@ -274,6 +278,10 @@ class Encryption_test extends CI_TestCase {
$this->markTestSkipped('Both MCrypt and OpenSSL support are required for portability tests.');
return;
}
+ elseif (version_compare(PHP_VERSION, '7.1.0-alpha', '>='))
+ {
+ return $this->markTestSkipped('ext/mcrypt is deprecated since PHP 7.1 and will generate notices here.');
+ }
$message = 'This is a message encrypted via MCrypt and decrypted via OpenSSL, or vice-versa.';
@@ -377,4 +385,4 @@ class Encryption_test extends CI_TestCase {
$this->assertEquals('stream', $this->encryption->mode);
}
-} \ No newline at end of file
+}