tony2001                Thu Apr 12 12:43:54 2007 UTC

  Added files:                 
    /php-src/ext/reflection/tests       025.phpt 

  Modified files:              
    /php-src/ext/reflection/tests       009.phpt 010.phpt 011.phpt 012.phpt 
                                        013.phpt 014.phpt 015.phpt 016.phpt 
                                        017.phpt 018.phpt 019.phpt 020.phpt 
                                        021.phpt 022.phpt 023.phpt 024.phpt 
                                        bug37816.phpt bug38217.phpt 
                                        bug38653.phpt bug38942.phpt 
                                        bug39001.phpt bug39067.phpt 
                                        bug39884.phpt bug40431.phpt 
  Log:
  add new test and SKIPIF sections
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/009.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/reflection/tests/009.phpt
diff -u php-src/ext/reflection/tests/009.phpt:1.2 
php-src/ext/reflection/tests/009.phpt:1.3
--- php-src/ext/reflection/tests/009.phpt:1.2   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/009.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionMethod::__construct() tests
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/010.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/010.phpt
diff -u php-src/ext/reflection/tests/010.phpt:1.1 
php-src/ext/reflection/tests/010.phpt:1.2
--- php-src/ext/reflection/tests/010.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/010.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionMethod::__toString() tests (overriden method)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/011.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/011.phpt
diff -u php-src/ext/reflection/tests/011.phpt:1.1 
php-src/ext/reflection/tests/011.phpt:1.2
--- php-src/ext/reflection/tests/011.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/011.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionExtension::getClasses()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 $ext = new ReflectionExtension("reflection");
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/012.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/012.phpt
diff -u php-src/ext/reflection/tests/012.phpt:1.1 
php-src/ext/reflection/tests/012.phpt:1.2
--- php-src/ext/reflection/tests/012.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/012.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionClass::getDefaultProperties()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/013.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/013.phpt
diff -u php-src/ext/reflection/tests/013.phpt:1.1 
php-src/ext/reflection/tests/013.phpt:1.2
--- php-src/ext/reflection/tests/013.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/013.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionExtension::getFunctions()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 $ext = new ReflectionExtension("standard");
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/014.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/014.phpt
diff -u php-src/ext/reflection/tests/014.phpt:1.1 
php-src/ext/reflection/tests/014.phpt:1.2
--- php-src/ext/reflection/tests/014.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/014.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionExtension::getConstants()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 $ext = new ReflectionExtension("standard");
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/015.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/015.phpt
diff -u php-src/ext/reflection/tests/015.phpt:1.1 
php-src/ext/reflection/tests/015.phpt:1.2
--- php-src/ext/reflection/tests/015.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/015.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionExtension::getINIEntries()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --INI--
 user_agent=php
 --FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/016.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/016.phpt
diff -u php-src/ext/reflection/tests/016.phpt:1.1 
php-src/ext/reflection/tests/016.phpt:1.2
--- php-src/ext/reflection/tests/016.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/016.phpt       Thu Apr 12 12:43:54 2007
@@ -2,6 +2,7 @@
 ReflectionExtension::getDependencies()
 --SKIPIF--
 <?php
+extension_loaded('reflection') or die('skip'); 
 if (!extension_loaded("xml")) {
   die('skip xml extension not available');
 }
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/017.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/017.phpt
diff -u php-src/ext/reflection/tests/017.phpt:1.1 
php-src/ext/reflection/tests/017.phpt:1.2
--- php-src/ext/reflection/tests/017.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/017.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionClass::__toString() (constants)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/018.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/018.phpt
diff -u php-src/ext/reflection/tests/018.phpt:1.1 
php-src/ext/reflection/tests/018.phpt:1.2
--- php-src/ext/reflection/tests/018.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/018.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Reflection::getModifierNames
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 var_dump(Reflection::getModifierNames(ReflectionMethod::IS_FINAL | 
ReflectionMethod::IS_PROTECTED));
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/019.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/019.phpt
diff -u php-src/ext/reflection/tests/019.phpt:1.1 
php-src/ext/reflection/tests/019.phpt:1.2
--- php-src/ext/reflection/tests/019.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/019.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionFunction::getExtensionName
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 $f = new ReflectionFunction("sleep");
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/020.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/020.phpt
diff -u php-src/ext/reflection/tests/020.phpt:1.1 
php-src/ext/reflection/tests/020.phpt:1.2
--- php-src/ext/reflection/tests/020.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/020.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionObject::hasProperty
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/021.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/021.phpt
diff -u php-src/ext/reflection/tests/021.phpt:1.1 
php-src/ext/reflection/tests/021.phpt:1.2
--- php-src/ext/reflection/tests/021.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/021.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionClass::hasConstant
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/022.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/022.phpt
diff -u php-src/ext/reflection/tests/022.phpt:1.1 
php-src/ext/reflection/tests/022.phpt:1.2
--- php-src/ext/reflection/tests/022.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/022.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionClass::getConstant
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class Foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/023.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/023.phpt
diff -u php-src/ext/reflection/tests/023.phpt:1.1 
php-src/ext/reflection/tests/023.phpt:1.2
--- php-src/ext/reflection/tests/023.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/023.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionClass::getDefaultProperties (filtering parent privates)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class C1 {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/024.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/024.phpt
diff -u php-src/ext/reflection/tests/024.phpt:1.1 
php-src/ext/reflection/tests/024.phpt:1.2
--- php-src/ext/reflection/tests/024.phpt:1.1   Tue Oct 17 11:11:45 2006
+++ php-src/ext/reflection/tests/024.phpt       Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 ReflectionObject::__toString (filtering privates/protected dynamic properties)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class C1 {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug37816.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/bug37816.phpt
diff -u php-src/ext/reflection/tests/bug37816.phpt:1.1 
php-src/ext/reflection/tests/bug37816.phpt:1.2
--- php-src/ext/reflection/tests/bug37816.phpt:1.1      Mon Jul 10 00:13:50 2006
+++ php-src/ext/reflection/tests/bug37816.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #37816 (ReflectionProperty does not throw exception when accessing 
protected attribute)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug38217.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/reflection/tests/bug38217.phpt
diff -u php-src/ext/reflection/tests/bug38217.phpt:1.2 
php-src/ext/reflection/tests/bug38217.phpt:1.3
--- php-src/ext/reflection/tests/bug38217.phpt:1.2      Wed Jul 26 08:06:59 2006
+++ php-src/ext/reflection/tests/bug38217.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
-#38217 (ReflectionClass::newInstanceArgs() tries to allocate too much memory)
+Bug #38217 (ReflectionClass::newInstanceArgs() tries to allocate too much 
memory)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug38653.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/bug38653.phpt
diff -u php-src/ext/reflection/tests/bug38653.phpt:1.1 
php-src/ext/reflection/tests/bug38653.phpt:1.2
--- php-src/ext/reflection/tests/bug38653.phpt:1.1      Wed Aug 30 10:41:43 2006
+++ php-src/ext/reflection/tests/bug38653.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #38653 (memory leak in ReflectionClass::getConstant())
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug38942.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/reflection/tests/bug38942.phpt
diff -u php-src/ext/reflection/tests/bug38942.phpt:1.3 
php-src/ext/reflection/tests/bug38942.phpt:1.4
--- php-src/ext/reflection/tests/bug38942.phpt:1.3      Mon Oct  2 08:35:43 2006
+++ php-src/ext/reflection/tests/bug38942.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #38942 (Double old-style-ctor inheritance)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class foo {
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39001.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/bug39001.phpt
diff -u php-src/ext/reflection/tests/bug39001.phpt:1.1 
php-src/ext/reflection/tests/bug39001.phpt:1.2
--- php-src/ext/reflection/tests/bug39001.phpt:1.1      Mon Oct  2 12:15:47 2006
+++ php-src/ext/reflection/tests/bug39001.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #39001 (ReflectionProperty returns incorrect declaring class for protected 
properties)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39067.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/reflection/tests/bug39067.phpt
diff -u php-src/ext/reflection/tests/bug39067.phpt:1.3 
php-src/ext/reflection/tests/bug39067.phpt:1.4
--- php-src/ext/reflection/tests/bug39067.phpt:1.3      Wed Oct 11 15:51:17 2006
+++ php-src/ext/reflection/tests/bug39067.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #39067 (getDeclaringClass() and private properties)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug39884.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/reflection/tests/bug39884.phpt
diff -u php-src/ext/reflection/tests/bug39884.phpt:1.3 
php-src/ext/reflection/tests/bug39884.phpt:1.4
--- php-src/ext/reflection/tests/bug39884.phpt:1.3      Sat Mar 17 23:38:41 2007
+++ php-src/ext/reflection/tests/bug39884.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #39884 (ReflectionParameter::getClass() throws exception for type hint 
self)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 class stubParamTest
http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug40431.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/reflection/tests/bug40431.phpt
diff -u php-src/ext/reflection/tests/bug40431.phpt:1.1 
php-src/ext/reflection/tests/bug40431.phpt:1.2
--- php-src/ext/reflection/tests/bug40431.phpt:1.1      Sat Feb 10 20:51:42 2007
+++ php-src/ext/reflection/tests/bug40431.phpt  Thu Apr 12 12:43:54 2007
@@ -1,5 +1,7 @@
 --TEST--
 Bug #40431 (dynamic properties may cause crash in ReflectionProperty methods)
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
 --FILE--
 <?php
 

http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/025.phpt?view=markup&rev=1.1
Index: php-src/ext/reflection/tests/025.phpt
+++ php-src/ext/reflection/tests/025.phpt
--TEST--
ReflectionFunction basic tests
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
--FILE--
<?php

/**
hoho
*/
function test ($a, $b = 1, $c = "") {
        static $var = 1;
}

$func = new ReflectionFunction("test");

var_dump($func->export("test"));
echo "--getName--\n";
var_dump($func->getName());
echo "--isInternal--\n";
var_dump($func->isInternal());
echo "--isUserDefined--\n";
var_dump($func->isUserDefined());
echo "--getFilename--\n";
var_dump($func->getFilename());
echo "--getStartline--\n";
var_dump($func->getStartline());
echo "--getEndline--\n";
var_dump($func->getEndline());
echo "--getDocComment--\n";
var_dump($func->getDocComment());
echo "--getStaticVariables--\n";
var_dump($func->getStaticVariables());
echo "--invoke--\n";
var_dump($func->invoke(array(1,2,3)));
echo "--invokeArgs--\n";
var_dump($func->invokeArgs(array(1,2,3)));
echo "--returnsReference--\n";
var_dump($func->returnsReference());
echo "--getParameters--\n";
var_dump($func->getParameters());
echo "--getNumberOfParameters--\n";
var_dump($func->getNumberOfParameters());
echo "--getNumberOfRequiredParameters--\n";
var_dump($func->getNumberOfRequiredParameters());

echo "Done\n";

?>
--EXPECTF--     
/**
hoho
*/
Function [ <user> function test ] {
  @@ %s025.php 6 - 8

  - Parameters [3] {
    Parameter #0 [ <required> $a ]
    Parameter #1 [ <optional> $b = 1 ]
    Parameter #2 [ <optional> $c = '' ]
  }
}

NULL
--getName--
string(4) "test"
--isInternal--
bool(false)
--isUserDefined--
bool(true)
--getFilename--
string(%d) "%s025.php"
--getStartline--
int(6)
--getEndline--
int(8)
--getDocComment--
string(11) "/**
hoho
*/"
--getStaticVariables--
array(1) {
  ["var"]=>
  int(1)
}
--invoke--
NULL
--invokeArgs--
NULL
--returnsReference--
bool(false)
--getParameters--
array(3) {
  [0]=>
  &object(ReflectionParameter)#2 (1) {
    ["name"]=>
    string(1) "a"
  }
  [1]=>
  &object(ReflectionParameter)#3 (1) {
    ["name"]=>
    string(1) "b"
  }
  [2]=>
  &object(ReflectionParameter)#4 (1) {
    ["name"]=>
    string(1) "c"
  }
}
--getNumberOfParameters--
int(3)
--getNumberOfRequiredParameters--
int(1)
Done
--UEXPECTF--
/**
hoho
*/
Function [ <user> function test ] {
  @@ %s 6 - 8

  - Parameters [3] {
    Parameter #0 [ <required> $a ]
    Parameter #1 [ <optional> $b = 1 ]
    Parameter #2 [ <optional> $c = '' ]
  }
}

NULL
--getName--
unicode(4) "test"
--isInternal--
bool(false)
--isUserDefined--
bool(true)
--getFilename--
unicode(%d) "%s025.php"
--getStartline--
int(6)
--getEndline--
int(8)
--getDocComment--
unicode(11) "/**
hoho
*/"
--getStaticVariables--
array(1) {
  [u"var"]=>
  int(1)
}
--invoke--
NULL
--invokeArgs--
NULL
--returnsReference--
bool(false)
--getParameters--
array(3) {
  [0]=>
  &object(ReflectionParameter)#2 (1) {
    [u"name"]=>
    unicode(1) "a"
  }
  [1]=>
  &object(ReflectionParameter)#3 (1) {
    [u"name"]=>
    unicode(1) "b"
  }
  [2]=>
  &object(ReflectionParameter)#4 (1) {
    [u"name"]=>
    unicode(1) "c"
  }
}
--getNumberOfParameters--
int(3)
--getNumberOfRequiredParameters--
int(1)
Done

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to