php-src/ext/reflection/tests/ReflectionExtension_constructor_error.phpt
2015-05-16 16:49:14 -05:00

34 lines
769 B
PHP

--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;
}
?>
==DONE==
--EXPECTF--
Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given
Ok - ReflectionExtension::__construct() expects exactly %d parameter, %d given
Ok - ReflectionExtension::__construct() expects parameter 1 to be string, array given
==DONE==