/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/reflection/tests/ReflectionExtension_constructor_error.phpt
31 строка
773 B
Máté Kocsis
Improve error messages mentioning parameters instead of arguments
09 сен 2020, 11:47
Не верифицирован
09 сен 2020, 11:47
9975986
Код
Авторство
О чём код?
--TEST-- ReflectionExtension::__construct() --CREDITS-- Gerrit "Remi" te Sligte <remi@wolerized.com> Leon Luijkx <leon@phpgg.nl> --FILE-- <?php try { $obj = new ReflectionExtension(); } catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { $obj = new ReflectionExtension('foo', 'bar'); } catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } try { $obj = new ReflectionExtension([]); } catch (TypeError $re) { echo "Ok - ".$re->getMessage().PHP_EOL; } ?> --EXPECT-- Ok - ReflectionExtension::__construct() expects exactly 1 argument, 0 given Ok - ReflectionExtension::__construct() expects exactly 1 argument, 2 given Ok - ReflectionExtension::__construct(): Argument #1 ($name) must be of type string, array given