summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-09-14 12:47:31 +0200
committerGitHub <noreply@github.com>2021-09-14 12:47:31 +0200
commit4fa09ccaa80770ed11a2fdf6f1e28c5e14914be4 (patch)
tree69cae04c446204d3500f117048e4092120787b04 /tests/Bootstrap.php
parent83a4588893dc1cde7d890a2461ac8af6efbf8ad7 (diff)
parentc7e171e0d83d7092d459c2754a1ee3aba33e43ef (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';