diff options
| author | Gabriel Caruso <carusogabriel34@gmail.com> | 2018-02-03 03:05:55 -0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-02-03 14:10:51 +0100 |
| commit | a920db8f135c1d64e7aeff12e2fd4d394454c5ab (patch) | |
| tree | 12535c2c3b1ba065847c35cea941e67a1e407bc4 | |
| parent | c6c9e71a5b65aa96ad133f90d7f48b18cdc95788 (diff) | |
| download | php-git-a920db8f135c1d64e7aeff12e2fd4d394454c5ab.tar.gz | |
Remove superfluous SKIPIF sections in Reflection tests
24 files changed, 29 insertions, 86 deletions
diff --git a/ext/reflection/tests/010.phpt b/ext/reflection/tests/010.phpt index 8f92feea09..8345dc35bf 100644 --- a/ext/reflection/tests/010.phpt +++ b/ext/reflection/tests/010.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionMethod::__toString() tests (overriden method) ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -15,7 +13,7 @@ class Bar extends Foo { $m = new ReflectionMethod("Bar::func"); echo $m; ?> ---EXPECTF-- +--EXPECTF-- Method [ <user, overwrites Foo, prototype Foo> public method func ] { @@ %s010.php 7 - 8 } diff --git a/ext/reflection/tests/011.phpt b/ext/reflection/tests/011.phpt index b39be37c90..1dcd0d040a 100644 --- a/ext/reflection/tests/011.phpt +++ b/ext/reflection/tests/011.phpt @@ -1,12 +1,10 @@ --TEST-- ReflectionExtension::getClasses() ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php $ext = new ReflectionExtension("reflection"); $classes = $ext->getClasses(); echo $classes["ReflectionException"]->getName(); ?> ---EXPECT-- +--EXPECT-- ReflectionException diff --git a/ext/reflection/tests/012.phpt b/ext/reflection/tests/012.phpt index b8a2694004..d2d1c5f384 100644 --- a/ext/reflection/tests/012.phpt +++ b/ext/reflection/tests/012.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionClass::getDefaultProperties() ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -11,6 +9,5 @@ $class = new ReflectionClass("Foo"); $props = $class->getDefaultProperties(); echo $props["test"]; ?> ---EXPECT-- +--EXPECT-- ok - diff --git a/ext/reflection/tests/013.phpt b/ext/reflection/tests/013.phpt index 9ecfa8b66c..f9ebc60871 100644 --- a/ext/reflection/tests/013.phpt +++ b/ext/reflection/tests/013.phpt @@ -1,13 +1,10 @@ --TEST-- ReflectionExtension::getFunctions() ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php $ext = new ReflectionExtension("standard"); $funcs = $ext->getFunctions(); echo $funcs["sleep"]->getName(); ?> ---EXPECT-- +--EXPECT-- sleep - diff --git a/ext/reflection/tests/014.phpt b/ext/reflection/tests/014.phpt index 8b5955f124..071f3ad746 100644 --- a/ext/reflection/tests/014.phpt +++ b/ext/reflection/tests/014.phpt @@ -1,13 +1,10 @@ --TEST-- ReflectionExtension::getConstants() ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php $ext = new ReflectionExtension("standard"); $consts = $ext->getConstants(); var_dump($consts["CONNECTION_NORMAL"]); ?> ---EXPECT-- +--EXPECT-- int(0) - diff --git a/ext/reflection/tests/015.phpt b/ext/reflection/tests/015.phpt index b17236242a..27c1f8cb32 100644 --- a/ext/reflection/tests/015.phpt +++ b/ext/reflection/tests/015.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionExtension::getINIEntries() ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --INI-- user_agent=php --FILE-- @@ -10,6 +8,5 @@ $ext = new ReflectionExtension("standard"); $inis = $ext->getINIEntries(); var_dump($inis["user_agent"]); ?> ---EXPECT-- +--EXPECT-- string(3) "php" - diff --git a/ext/reflection/tests/016.phpt b/ext/reflection/tests/016.phpt index d289165251..f63b751a27 100644 --- a/ext/reflection/tests/016.phpt +++ b/ext/reflection/tests/016.phpt @@ -2,7 +2,6 @@ ReflectionExtension::getDependencies() --SKIPIF-- <?php -extension_loaded('reflection') or die('skip'); if (!extension_loaded("xml")) { die('skip xml extension not available'); } @@ -13,7 +12,7 @@ $ext = new ReflectionExtension("xml"); $deps = $ext->getDependencies(); var_dump($deps); ?> ---EXPECT-- +--EXPECT-- array(1) { ["libxml"]=> string(8) "Required" diff --git a/ext/reflection/tests/017.phpt b/ext/reflection/tests/017.phpt index 1d9275d21b..322065bf20 100644 --- a/ext/reflection/tests/017.phpt +++ b/ext/reflection/tests/017.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionClass::__toString() (constants) ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -30,4 +28,3 @@ Class [ <user> class Foo ] { - Methods [0] { } } - diff --git a/ext/reflection/tests/018.phpt b/ext/reflection/tests/018.phpt index fbda5d62d4..e6a94a557c 100644 --- a/ext/reflection/tests/018.phpt +++ b/ext/reflection/tests/018.phpt @@ -1,12 +1,10 @@ --TEST-- Reflection::getModifierNames ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php var_dump(Reflection::getModifierNames(ReflectionMethod::IS_FINAL | ReflectionMethod::IS_PROTECTED)); ?> ---EXPECT-- +--EXPECT-- array(2) { [0]=> string(5) "final" diff --git a/ext/reflection/tests/019.phpt b/ext/reflection/tests/019.phpt index b6ac20c6bd..9e4093d6e3 100644 --- a/ext/reflection/tests/019.phpt +++ b/ext/reflection/tests/019.phpt @@ -1,11 +1,9 @@ --TEST-- ReflectionFunction::getExtensionName ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php $f = new ReflectionFunction("sleep"); var_dump($f->getExtensionName()); ?> ---EXPECT-- +--EXPECT-- string(8) "standard" diff --git a/ext/reflection/tests/020.phpt b/ext/reflection/tests/020.phpt index c5b0ae5c2a..13ae6fe275 100644 --- a/ext/reflection/tests/020.phpt +++ b/ext/reflection/tests/020.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionObject::hasProperty ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -20,7 +18,7 @@ var_dump($obj->hasProperty("p2")); var_dump($obj->hasProperty("p3")); var_dump($obj->hasProperty("p4")); ?> ---EXPECT-- +--EXPECT-- bool(true) bool(true) bool(true) diff --git a/ext/reflection/tests/021.phpt b/ext/reflection/tests/021.phpt index 30dbb5afcb..42d11cc445 100644 --- a/ext/reflection/tests/021.phpt +++ b/ext/reflection/tests/021.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionClass::hasConstant ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -11,6 +9,6 @@ $class = new ReflectionClass("Foo"); var_dump($class->hasConstant("c1")); var_dump($class->hasConstant("c2")); ?> ---EXPECT-- +--EXPECT-- bool(true) bool(false) diff --git a/ext/reflection/tests/022.phpt b/ext/reflection/tests/022.phpt index 50dbd6ec74..2cfd603dad 100644 --- a/ext/reflection/tests/022.phpt +++ b/ext/reflection/tests/022.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionClass::getConstant ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class Foo { @@ -11,6 +9,6 @@ $class = new ReflectionClass("Foo"); var_dump($class->getConstant("c1")); var_dump($class->getConstant("c2")); ?> ---EXPECT-- +--EXPECT-- int(1) bool(false) diff --git a/ext/reflection/tests/023.phpt b/ext/reflection/tests/023.phpt index ab11365951..fe10b2531a 100644 --- a/ext/reflection/tests/023.phpt +++ b/ext/reflection/tests/023.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionClass::getDefaultProperties (filtering parent privates) ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class C1 { @@ -17,7 +15,7 @@ class C2 extends C1 { $class = new ReflectionClass("C2"); var_dump($class->getDefaultProperties()); ?> ---EXPECT-- +--EXPECT-- array(5) { ["p4"]=> int(4) diff --git a/ext/reflection/tests/024.phpt b/ext/reflection/tests/024.phpt index a1c2c81a93..2b894d3f31 100644 --- a/ext/reflection/tests/024.phpt +++ b/ext/reflection/tests/024.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionObject::__toString (filtering privates/protected dynamic properties) ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --FILE-- <?php class C1 { @@ -17,7 +15,7 @@ $x->p3 = 5; $obj = new ReflectionObject($x); echo $obj; ?> ---EXPECTF-- +--EXPECTF-- Object of class [ <user> class C1 ] { @@ %s024.php 2-6 diff --git a/ext/reflection/tests/025.phpt b/ext/reflection/tests/025.phpt index 0259d66bd3..f1e13d9240 100644 --- a/ext/reflection/tests/025.phpt +++ b/ext/reflection/tests/025.phpt @@ -1,7 +1,5 @@ --TEST-- ReflectionFunction basic tests ---SKIPIF-- -<?php extension_loaded('reflection') or die('skip'); ?> --INI-- opcache.save_comments=1 --FILE-- @@ -49,7 +47,7 @@ var_dump($func->getNumberOfRequiredParameters()); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- /** hoho */ diff --git a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt index bbe5fdbaec..0e6e249bf9 100644 --- a/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt @@ -3,14 +3,11 @@ Reflection class can not be cloned --CREDITS-- Stefan Koopmanschap <stefan@phpgg.nl> TestFest PHP|Tek ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> ---FILE-- +--FILE-- <?php $rc = new ReflectionClass("stdClass"); $rc2 = clone($rc); +?> --EXPECTF-- Fatal error: Uncaught Error: Trying to clone an uncloneable object of class ReflectionClass in %s:%d Stack trace: diff --git a/ext/reflection/tests/ReflectionExtension_bug66218.phpt b/ext/reflection/tests/ReflectionExtension_bug66218.phpt index e263624bad..77f3d230b3 100644 --- a/ext/reflection/tests/ReflectionExtension_bug66218.phpt +++ b/ext/reflection/tests/ReflectionExtension_bug66218.phpt @@ -2,7 +2,6 @@ ReflectionExtension::getFunctions() ##6218 zend_register_functions breaks reflection --SKIPIF-- <?php -if (!extension_loaded('reflection')) print 'skip missing reflection extension'; if (PHP_SAPI != "cli") die("skip CLI only test"); if (!function_exists("dl")) die("skip need dl"); ?> diff --git a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt index e32790c923..b8b969b0bc 100644 --- a/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt +++ b/ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt @@ -1,10 +1,6 @@ --TEST-- Reflection::getClosureScopeClass() ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> ---FILE-- +--FILE-- <?php $closure = function($param) { return "this is a closure"; }; $rf = new ReflectionFunction($closure); @@ -20,6 +16,7 @@ $closure = A::getClosure(); $rf = new ReflectionFunction($closure); var_dump($rf->getClosureScopeClass()); echo "Done!\n"; +?> --EXPECTF-- NULL object(ReflectionClass)#%d (1) { diff --git a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt index 4795025798..367de45fff 100644 --- a/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt +++ b/ext/reflection/tests/ReflectionFunction_getClosureThis.phpt @@ -1,15 +1,12 @@ --TEST-- Reflection::getClosureThis() ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> ---FILE-- +--FILE-- <?php $closure = function($param) { return "this is a closure"; }; $rf = new ReflectionFunction($closure); var_dump($rf->getClosureThis()); echo "Done!\n"; +?> --EXPECTF-- NULL Done! diff --git a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt index df101fcd3e..7c36b8e63b 100644 --- a/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt +++ b/ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt @@ -3,14 +3,11 @@ Reflection::isClosure --CREDITS-- Stefan Koopmanschap <stefan@phpgg.nl> TestFest PHP|Tek ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> ---FILE-- +--FILE-- <?php $closure = function($param) { return "this is a closure"; }; $rc = new ReflectionFunction($closure); var_dump($rc->isClosure()); +?> --EXPECTF-- bool(true) diff --git a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt index 30189cf4de..d6d2c24b85 100644 --- a/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt +++ b/ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt @@ -3,15 +3,12 @@ ReflectionFunction::isDisabled --CREDITS-- Stefan Koopmanschap <stefan@phpgg.nl> TestFest PHP|Tek ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> --INI-- disable_functions=is_file ---FILE-- +--FILE-- <?php $rc = new ReflectionFunction('is_file'); var_dump($rc->isDisabled()); +?> --EXPECTF-- bool(true) diff --git a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt index 536f40c2e1..3a931172f1 100644 --- a/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt +++ b/ext/reflection/tests/ReflectionMethod_getClosureThis.phpt @@ -1,10 +1,6 @@ --TEST-- Reflection::getClosureThis() ---SKIPIF-- -<?php -if (!extension_loaded('reflection')) print 'skip'; -?> ---FILE-- +--FILE-- <?php class StaticExample { @@ -42,6 +38,7 @@ $rf = new ReflectionFunction($closure); var_dump($rf->getClosureThis()); echo "Done!\n"; +?> --EXPECTF-- NULL object(Example)#%d (1) { diff --git a/ext/reflection/tests/bug64936.phpt b/ext/reflection/tests/bug64936.phpt index a4a66d4f48..c3e781805e 100644 --- a/ext/reflection/tests/bug64936.phpt +++ b/ext/reflection/tests/bug64936.phpt @@ -1,11 +1,9 @@ --TEST-- ReflectionMethod::getDocComment() uses left over doc comment from previous scanner run +--SKIPIF-- +<?php if (!extension_loaded('tokenizer')) die('skip tokenizer extension not loaded'); ?> --INI-- opcache.save_comments=1 ---SKIPIF-- -<?php -if (!extension_loaded('reflection') || !extension_loaded('tokenizer')) print 'skip missing reflection of tokernizer extension'; -?> --FILE-- <?php |
