|
|
@@ -76,7 +76,7 @@ class SecurityTest extends TestCase
|
|
|
*/
|
|
|
public function testRijndael()
|
|
|
{
|
|
|
- $this->skipIf(!function_exists('mcrypt_encrypt'));
|
|
|
+ $this->skipIf(!function_exists('mcrypt_encrypt') || version_compare(PHP_VERSION, '7.1', '>='));
|
|
|
$engine = Security::engine();
|
|
|
|
|
|
Security::engine(new Mcrypt());
|
|
|
@@ -259,8 +259,8 @@ class SecurityTest extends TestCase
|
|
|
*/
|
|
|
public function testEngineEquivalence()
|
|
|
{
|
|
|
- $this->skipIf(!defined('MCRYPT_RIJNDAEL_128'), 'This needs mcrypt extension to be loaded.');
|
|
|
-
|
|
|
+ $this->skipIf(!function_exists('mcrypt_encrypt') || version_compare(PHP_VERSION, '7.1', '>='), 'This needs mcrypt extension to be loaded.');
|
|
|
+
|
|
|
$restore = Security::engine();
|
|
|
$txt = "Obi-wan you're our only hope";
|
|
|
$key = 'This is my secret key phrase it is quite long.';
|