From 1efa2ab3fc54f46a782866d61c275a9ccc216e83 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 12 Apr 2007 12:43:54 +0000 Subject: [PATCH] add new test and SKIPIF sections --- ext/reflection/tests/009.phpt | 2 + ext/reflection/tests/010.phpt | 2 + ext/reflection/tests/011.phpt | 2 + ext/reflection/tests/012.phpt | 2 + ext/reflection/tests/013.phpt | 2 + ext/reflection/tests/014.phpt | 2 + ext/reflection/tests/015.phpt | 2 + ext/reflection/tests/016.phpt | 1 + ext/reflection/tests/017.phpt | 2 + ext/reflection/tests/018.phpt | 2 + ext/reflection/tests/019.phpt | 2 + ext/reflection/tests/020.phpt | 2 + ext/reflection/tests/021.phpt | 2 + ext/reflection/tests/022.phpt | 2 + ext/reflection/tests/023.phpt | 2 + ext/reflection/tests/024.phpt | 2 + ext/reflection/tests/025.phpt | 179 +++++++++++++++++++++++++++++ ext/reflection/tests/bug37816.phpt | 2 + ext/reflection/tests/bug38217.phpt | 4 +- ext/reflection/tests/bug38653.phpt | 2 + ext/reflection/tests/bug38942.phpt | 2 + ext/reflection/tests/bug39001.phpt | 2 + ext/reflection/tests/bug39067.phpt | 2 + ext/reflection/tests/bug39884.phpt | 2 + ext/reflection/tests/bug40431.phpt | 2 + 25 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 ext/reflection/tests/025.phpt diff --git a/ext/reflection/tests/009.phpt b/ext/reflection/tests/009.phpt index e88c6d5aba..4e81a025fc 100755 --- a/ext/reflection/tests/009.phpt +++ b/ext/reflection/tests/009.phpt @@ -1,5 +1,7 @@ --TEST-- ReflectionMethod::__construct() tests +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --INI-- user_agent=php --FILE-- diff --git a/ext/reflection/tests/016.phpt b/ext/reflection/tests/016.phpt index 1c8ec6be63..e1f71b3697 100755 --- a/ext/reflection/tests/016.phpt +++ b/ext/reflection/tests/016.phpt @@ -2,6 +2,7 @@ ReflectionExtension::getDependencies() --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- +--FILE-- +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 [ function test ] { + @@ %s025.php 6 - 8 + + - Parameters [3] { + Parameter #0 [ $a ] + Parameter #1 [ $b = 1 ] + Parameter #2 [ $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 [ function test ] { + @@ %s 6 - 8 + + - Parameters [3] { + Parameter #0 [ $a ] + Parameter #1 [ $b = 1 ] + Parameter #2 [ $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 diff --git a/ext/reflection/tests/bug37816.phpt b/ext/reflection/tests/bug37816.phpt index 18a49046dc..1121d54188 100755 --- a/ext/reflection/tests/bug37816.phpt +++ b/ext/reflection/tests/bug37816.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #37816 (ReflectionProperty does not throw exception when accessing protected attribute) +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE--