diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-06 11:23:38 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-06 13:40:22 +0100 |
commit | 8c62c69265817bfd736ac77745cf7686a48d280c (patch) | |
tree | 7776624d2cf5bce5093afe82886fae1bc398c0a4 /ext/reflection | |
parent | db777e9199a94f95416ea16baf82a7d10a0bbe51 (diff) | |
download | php-git-8c62c69265817bfd736ac77745cf7686a48d280c.tar.gz |
More zpp error/variation test removals
Some of these tests also check non-zpp conditions -- however, there is
always some other test that also checks those error conditions.
Diffstat (limited to 'ext/reflection')
5 files changed, 0 insertions, 155 deletions
diff --git a/ext/reflection/tests/ReflectionClass_getConstants_error.phpt b/ext/reflection/tests/ReflectionClass_getConstants_error.phpt deleted file mode 100644 index 1784d712a4..0000000000 --- a/ext/reflection/tests/ReflectionClass_getConstants_error.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -ReflectionClass::getConstants() ---FILE-- -<?php -class X { -} - -$rc = new reflectionClass('X'); - -//Test invalid arguments -$rc->getConstants('X'); -$rc->getConstants(true); -$rc->getConstants(null); -$rc->getConstants('A', 'B'); - -?> ---EXPECTF-- -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d - -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d - -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 1 given in %s on line %d - -Warning: ReflectionClass::getConstants() expects exactly 0 parameters, 2 given in %s on line %d diff --git a/ext/reflection/tests/ReflectionObject_constructor_error.phpt b/ext/reflection/tests/ReflectionObject_constructor_error.phpt deleted file mode 100644 index 71a1166b13..0000000000 --- a/ext/reflection/tests/ReflectionObject_constructor_error.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -ReflectionObject::__construct - invalid arguments ---FILE-- -<?php - -var_dump(new ReflectionObject()); -var_dump(new ReflectionObject('stdClass')); -$myInstance = new stdClass; -var_dump(new ReflectionObject($myInstance, $myInstance)); -var_dump(new ReflectionObject(0)); -var_dump(new ReflectionObject(null)); -var_dump(new ReflectionObject(array(1,2))); -?> ---EXPECTF-- -Warning: ReflectionObject::__construct() expects exactly 1 parameter, 0 given in %s on line 3 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} - -Warning: ReflectionObject::__construct() expects parameter 1 to be object, string given in %s on line 4 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} - -Warning: ReflectionObject::__construct() expects exactly 1 parameter, 2 given in %s on line 6 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} - -Warning: ReflectionObject::__construct() expects parameter 1 to be object, int given in %s on line 7 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} - -Warning: ReflectionObject::__construct() expects parameter 1 to be object, null given in %s on line 8 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} - -Warning: ReflectionObject::__construct() expects parameter 1 to be object, array given in %s on line 9 -object(ReflectionObject)#%d (1) { - ["name"]=> - string(0) "" -} diff --git a/ext/reflection/tests/ReflectionObject_getConstant_error.phpt b/ext/reflection/tests/ReflectionObject_getConstant_error.phpt deleted file mode 100644 index 3f12f3a1ea..0000000000 --- a/ext/reflection/tests/ReflectionObject_getConstant_error.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -ReflectionObject::getConstant() - invalid params ---FILE-- -<?php -class C { - const myConst = 1; -} - -$rc = new ReflectionObject(new C); -var_dump($rc->getConstant()); -var_dump($rc->getConstant("myConst", "myConst")); -var_dump($rc->getConstant(null)); -var_dump($rc->getConstant(1)); -var_dump($rc->getConstant(1.5)); -var_dump($rc->getConstant(true)); -var_dump($rc->getConstant(array(1,2,3))); -var_dump($rc->getConstant(new C)); -?> ---EXPECTF-- -Warning: ReflectionClass::getConstant() expects exactly 1 parameter, 0 given in %s on line 7 -NULL - -Warning: ReflectionClass::getConstant() expects exactly 1 parameter, 2 given in %s on line 8 -NULL -bool(false) -bool(false) -bool(false) -bool(false) - -Warning: ReflectionClass::getConstant() expects parameter 1 to be string, array given in %s on line 13 -NULL - -Warning: ReflectionClass::getConstant() expects parameter 1 to be string, object given in %s on line 14 -NULL diff --git a/ext/reflection/tests/ReflectionParameter_export_error.phpt b/ext/reflection/tests/ReflectionParameter_export_error.phpt deleted file mode 100644 index e3d2bac0fc..0000000000 --- a/ext/reflection/tests/ReflectionParameter_export_error.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -ReflectionParameter::export() without parameters ---CREDITS-- -Stefan Koopmanschap <stefan@stefankoopmanschap.nl> ---FILE-- -<?php -function ReflectionParameterTest($test, $test2 = null) { - echo $test; -} -$reflect = new ReflectionFunction('ReflectionParameterTest'); -foreach($reflect->getParameters() as $key => $value) { - ReflectionParameter::export(); -} -?> -==DONE== ---EXPECTF-- -Warning: ReflectionParameter::export() expects at least 2 parameters, 0 given in %s.php on line %d - -Warning: ReflectionParameter::export() expects at least 2 parameters, 0 given in %s.php on line %d -==DONE== diff --git a/ext/reflection/tests/ReflectionProperty_getDocComment_error.phpt b/ext/reflection/tests/ReflectionProperty_getDocComment_error.phpt deleted file mode 100644 index dae7be2fb9..0000000000 --- a/ext/reflection/tests/ReflectionProperty_getDocComment_error.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test ReflectionProperty::getDocComment() errors. ---FILE-- -<?php - -class C { - public $a; -} - -$rc = new ReflectionProperty('C', 'a'); -var_dump($rc->getDocComment(null)); -var_dump($rc->getDocComment('X')); -var_dump($rc->getDocComment(true)); -var_dump($rc->getDocComment(array(1, 2, 3))); - -?> ---EXPECTF-- -Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL - -Warning: ReflectionProperty::getDocComment() expects exactly 0 parameters, 1 given in %s on line %d -NULL |