summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-09-14 12:47:31 +0200
committerAndrey Andreev <narf@devilix.net>2021-09-14 12:48:54 +0200
commit87928371de8a316c9880a451fae04d9785c32840 (patch)
tree105f60457936882e1d41fcf03c4e7189929951f3 /tests/Bootstrap.php
parent063aee9e0f6f560b479958e4fae9f5b77048c8fa (diff)
Merge pull request #6045 from gxgpet/develop_fixtravis
Fixes Travis pipeline. 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';