summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@users.noreply.github.com>2022-12-01 02:06:03 +0100
committerGitHub <noreply@github.com>2022-12-01 02:06:03 +0100
commit0588cc67f9a20358d170265aa1124c2d43339db8 (patch)
treeaf699da6f33578c5104d745826da8c307a3efe3d
parent22751f4de0489cd94874d197f7f017bb1c089a5f (diff)
parent517b9aec99df26283d283c6fa9793b64c1188332 (diff)
[ci skip] Merge pull request #6176 from tenzap/testfixassertMatchesRegularExpression
Adapt unit tests so as not to fail with PHPUnit 8.5
-rw-r--r--tests/codeigniter/core/Security_test.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php
index 5132e5887..4d76f4265 100644
--- a/tests/codeigniter/core/Security_test.php
+++ b/tests/codeigniter/core/Security_test.php
@@ -253,9 +253,9 @@ class Security_test extends CI_TestCase {
// Perform hash
$this->security->xss_hash();
- $assertRegExp = class_exists('PHPUnit_Runner_Version')
- ? 'assertRegExp'
- : 'assertMatchesRegularExpression';
+ $assertRegExp = method_exists($this, 'assertMatchesRegularExpression')
+ ? 'assertMatchesRegularExpression'
+ : 'assertRegExp';
$this->$assertRegExp('#^[0-9a-f]{32}$#iS', $this->security->xss_hash);
}