summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2021-05-31 12:28:25 +0200
committerGeorge Petculescu <gxgpet@gmail.com>2021-05-31 12:28:25 +0200
commit81c793551d2bd6c2919a9a46462d464965c8207f (patch)
treed1daf5024a3627df8493c8056e202302ca052d10 /tests/Bootstrap.php
parent56de63c5bdfd7962d2e64d6d9b0a5b7914d4ec6c (diff)
Adding PHPUnit 8
Diffstat (limited to 'tests/Bootstrap.php')
-rw-r--r--tests/Bootstrap.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index b4e56bdae..ada6a5998 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -65,6 +65,13 @@ else
is_php('5.6') && ini_set('php.internal_encoding', 'UTF-8');
+if (is_php('7.0'))
+{
+ $test_case_code = file_get_contents(PROJECT_BASE.'vendor/phpunit/phpunit/src/Framework/TestCase.php');
+ $test_case_code = preg_replace('/^\s+((?:protected|public)(?: static)? function \w+\(\)): void/m', '$1', $test_case_code);
+ file_put_contents(PROJECT_BASE.'vendor/phpunit/phpunit/src/Framework/TestCase.php', $test_case_code);
+}
+
include_once SYSTEM_PATH.'core/compat/mbstring.php';
include_once SYSTEM_PATH.'core/compat/hash.php';
include_once SYSTEM_PATH.'core/compat/password.php';