diff options
author | George Petculescu <gxgpet@users.noreply.github.com> | 2022-12-01 02:06:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 02:06:03 +0100 |
commit | 0588cc67f9a20358d170265aa1124c2d43339db8 (patch) | |
tree | af699da6f33578c5104d745826da8c307a3efe3d | |
parent | 22751f4de0489cd94874d197f7f017bb1c089a5f (diff) | |
parent | 517b9aec99df26283d283c6fa9793b64c1188332 (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.php | 6 |
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); } |