1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/16549] Avoid deprecated properties/methods in newer PHPUnit versions

PHPBB3-16549
This commit is contained in:
rxu
2020-07-13 22:23:55 +07:00
parent f6a7fe168a
commit c954249dfa
6 changed files with 190 additions and 29 deletions

View File

@@ -107,7 +107,10 @@ class phpbb_controller_controller_test extends phpbb_test_case
array(new foo\controller(), array(), array()),
array(array(new foo\controller(), 'handle_fail'), array(), array(), '\phpbb\controller\exception', 'CONTROLLER_ARGUMENT_VALUE_MISSING'),
array('', array(), array(), '\ReflectionException', 'Function () does not exist'),
array(new phpbb\controller\foo, array(), array(), '\ReflectionException', 'Method __invoke does not exist'),
// Before PHP 8: 'Method __invoke does not exist'
// As of PHP 8: 'Method phpbb\controller\foo::__invoke() does not exist'
array(new phpbb\controller\foo, array(), array(), '\ReflectionException',
'Method ' . (version_compare(PHP_VERSION, '8', '>=') ? 'phpbb\controller\foo::__invoke()' : '__invoke') . ' does not exist'),
);
}