]> granicus.if.org Git - php/commitdiff
Remove superfluous SKIPIF sections in Reflection tests
authorGabriel Caruso <carusogabriel34@gmail.com>
Sat, 3 Feb 2018 05:05:55 +0000 (03:05 -0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 3 Feb 2018 13:10:51 +0000 (14:10 +0100)
24 files changed:
ext/reflection/tests/010.phpt
ext/reflection/tests/011.phpt
ext/reflection/tests/012.phpt
ext/reflection/tests/013.phpt
ext/reflection/tests/014.phpt
ext/reflection/tests/015.phpt
ext/reflection/tests/016.phpt
ext/reflection/tests/017.phpt
ext/reflection/tests/018.phpt
ext/reflection/tests/019.phpt
ext/reflection/tests/020.phpt
ext/reflection/tests/021.phpt
ext/reflection/tests/022.phpt
ext/reflection/tests/023.phpt
ext/reflection/tests/024.phpt
ext/reflection/tests/025.phpt
ext/reflection/tests/ReflectionClass_CannotClone_basic.phpt
ext/reflection/tests/ReflectionExtension_bug66218.phpt
ext/reflection/tests/ReflectionFunction_getClosureScopeClass.phpt
ext/reflection/tests/ReflectionFunction_getClosureThis.phpt
ext/reflection/tests/ReflectionFunction_isClosure_basic.phpt
ext/reflection/tests/ReflectionFunction_isDisabled_basic.phpt
ext/reflection/tests/ReflectionMethod_getClosureThis.phpt
ext/reflection/tests/bug64936.phpt

index 8f92feea09e071c05e1a4142b1c64878a1d936b7..8345dc35bf9035f8afc1c05875634fc40a93ffdc 100644 (file)
@@ -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
 }
index b39be37c90a0f917d614a65da4d8adf3d4d8633f..1dcd0d040ae0152287b0df6d0fb63740e48ec160 100644 (file)
@@ -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
index b8a2694004b12abfb8627d96919a59185e341a8e..d2d1c5f384d183c235e4c21d1a839b57265fa637 100644 (file)
@@ -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
-
index 9ecfa8b66c7d735bd321cbfeea170a5fccadc405..f9ebc60871593e5cbee15f383033e64ddb512cce 100644 (file)
@@ -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
-
index 8b5955f12487a97779a804c5c635b9e6296e1d51..071f3ad746dee16f7779dc8f5b910a1772e0637e 100644 (file)
@@ -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)
-
index b17236242a121b79cc287b0126b9f90533c89c70..27c1f8cb323c0ee6ba9985ab7950d9e14e186fb0 100644 (file)
@@ -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"
-
index d289165251028958d6a8bf7938c4b8d7d881b38f..f63b751a279e179ee1e8aa86a6a65eb35b78fbf3 100644 (file)
@@ -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"
index 1d9275d21b48e76f7ee07282b6086f4fa512e924..322065bf20e342b0525f48e41c70b71147d07466 100644 (file)
@@ -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] {
   }
 }
-
index fbda5d62d446f09feedeacb6a63527af6a44d2f1..e6a94a557c90934a1633d21e745f79b59ad6f0c7 100644 (file)
@@ -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"
index b6ac20c6bd7add04be76990ee5f3655305abb6fa..9e4093d6e375618ad130df58cc5ea0d9d9be3818 100644 (file)
@@ -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"
index c5b0ae5c2ac30378acdde9201a8a46befd5c812a..13ae6fe27595f57a4654db7467a6721b46975c31 100644 (file)
@@ -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)
index 30dbb5afcb3b06e155996869943f078e6d49b6d4..42d11cc4456682137e3166940723094a4451ef8a 100644 (file)
@@ -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)
index 50dbd6ec74fb98ea2d633afdf302f8829754d593..2cfd603dad19f5443ecc8f642df1f6127759fae7 100644 (file)
@@ -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)
index ab113659511286e505ac1efb492bd5cd232b681e..fe10b2531a0eadd849bfac922840a8a1874bb86f 100644 (file)
@@ -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)
index a1c2c81a9307f4ad9ef93a5afd6fa5817c318cb5..2b894d3f31b57f2e1a38b1a909f8b6846d965661 100644 (file)
@@ -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
 
index 0259d66bd3c67abcf90cf13169389309e6907b69..f1e13d9240c6aaa8bdcb7a194f95a178e40e888f 100644 (file)
@@ -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
 */
index bbe5fdbaec4231f1681fdcb5874d76e74e421cab..0e6e249bf9095c4ae79ebe3bdc490ae12ac3ad3f 100644 (file)
@@ -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:
index e263624bada99f381d978f3e9573537b6ac1f163..77f3d230b3644a2a1bf2cc48d23d26c54d835d0f 100644 (file)
@@ -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");
 ?>
index e32790c92371560e2a49d79f8b9d5e7e6711d685..b8b969b0bc9108aa1648f556547e1527282cc547 100644 (file)
@@ -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) {
index 479502579829746fc8c0db1c27adadbac2cb6591..367de45fff51327e18171142bde8510ae8d5c2a3 100644 (file)
@@ -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!
index df101fcd3ee4a169eb0a52f24f458ab725b9d9e2..7c36b8e63bc11f462ccc3d515c96b615a652181c 100644 (file)
@@ -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)
index 30189cf4de515178d2a93a1c900a2131a2830b21..d6d2c24b8571fd35346d7baa0a6b94faddec6de4 100644 (file)
@@ -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)
index 536f40c2e1c424700c8aac8e09303384903a604d..3a931172f1c0bfa5f471b7358216b26666a5225b 100644 (file)
@@ -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) {
index a4a66d4f48d7ad2def4118c92d32750250b665a9..c3e781805eec3be83fc05b1118ffedbec9c4f47f 100644 (file)
@@ -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