diff options
Diffstat (limited to 'ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt')
| -rw-r--r-- | ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt | 88 |
1 files changed, 68 insertions, 20 deletions
diff --git a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt index d1a19c7116..c5fe6aa41a 100644 --- a/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt +++ b/ext/reflection/tests/ReflectionMethod_getModifiers_basic.phpt @@ -32,10 +32,14 @@ class TestClass public final function fin() {} + public function __construct() {} + public function __destruct() {} public function __call($a, $b) {} + public static function __callStatic($a, $b) {} + public function __clone() {} public function __get($a) {} @@ -44,6 +48,8 @@ class TestClass public function __unset($a) {} + public function __invoke() {} + public function __isset($a) {} public function __tostring() {} @@ -52,20 +58,26 @@ class TestClass public function __wakeup() {} - public function __set_state() {} + public static function __set_state($a) {} public function __autoload() {} + + public function __serialize() {} + + public function __unserialize($data) {} + + public function __debugInfo() {} } class DerivedClass extends TestClass {} interface TestInterface { - public function int(); - public function __clone(); + public function int(); + public function __clone(); } abstract class AbstractClass { - public abstract function foo(); + public abstract function foo(); } @@ -75,17 +87,13 @@ reflectMethodModifiers("DerivedClass"); reflectMethodModifiers("TestInterface"); reflectMethodModifiers("AbstractClass"); -echo "Wrong number of params:\n"; -$a = new ReflectionMethod('TestClass::foo'); -$a->getModifiers(1); - $a = new ReflectionMethod('ReflectionMethod::getModifiers'); -echo "\nReflectionMethod::getModifiers() modifiers:\n"; +echo "ReflectionMethod::getModifiers() modifiers:\n"; printf("0x%08x\n", $a->getModifiers()); ?> ---EXPECTF-- +--EXPECT-- Modifiers for method TestClass::foo(): 0x00000001 @@ -106,6 +114,10 @@ Modifiers for method TestClass::fin(): 0x00000021 +Modifiers for method TestClass::__construct(): +0x00000001 + + Modifiers for method TestClass::__destruct(): 0x00000001 @@ -114,6 +126,10 @@ Modifiers for method TestClass::__call(): 0x00000001 +Modifiers for method TestClass::__callStatic(): +0x00000011 + + Modifiers for method TestClass::__clone(): 0x00000001 @@ -130,6 +146,10 @@ Modifiers for method TestClass::__unset(): 0x00000001 +Modifiers for method TestClass::__invoke(): +0x00000001 + + Modifiers for method TestClass::__isset(): 0x00000001 @@ -147,13 +167,25 @@ Modifiers for method TestClass::__wakeup(): Modifiers for method TestClass::__set_state(): -0x00000001 +0x00000011 Modifiers for method TestClass::__autoload(): 0x00000001 +Modifiers for method TestClass::__serialize(): +0x00000001 + + +Modifiers for method TestClass::__unserialize(): +0x00000001 + + +Modifiers for method TestClass::__debugInfo(): +0x00000001 + + Modifiers for method TestClass::foo(): 0x00000001 @@ -162,10 +194,6 @@ Modifiers for method TestClass::stat(): 0x00000011 -Modifiers for method TestClass::priv(): -0x00000004 - - Modifiers for method TestClass::prot(): 0x00000002 @@ -174,6 +202,10 @@ Modifiers for method TestClass::fin(): 0x00000021 +Modifiers for method TestClass::__construct(): +0x00000001 + + Modifiers for method TestClass::__destruct(): 0x00000001 @@ -182,6 +214,10 @@ Modifiers for method TestClass::__call(): 0x00000001 +Modifiers for method TestClass::__callStatic(): +0x00000011 + + Modifiers for method TestClass::__clone(): 0x00000001 @@ -198,6 +234,10 @@ Modifiers for method TestClass::__unset(): 0x00000001 +Modifiers for method TestClass::__invoke(): +0x00000001 + + Modifiers for method TestClass::__isset(): 0x00000001 @@ -215,13 +255,25 @@ Modifiers for method TestClass::__wakeup(): Modifiers for method TestClass::__set_state(): -0x00000001 +0x00000011 Modifiers for method TestClass::__autoload(): 0x00000001 +Modifiers for method TestClass::__serialize(): +0x00000001 + + +Modifiers for method TestClass::__unserialize(): +0x00000001 + + +Modifiers for method TestClass::__debugInfo(): +0x00000001 + + Modifiers for method TestInterface::int(): 0x00000041 @@ -234,9 +286,5 @@ Modifiers for method AbstractClass::foo(): 0x00000041 -Wrong number of params: - -Warning: ReflectionMethod::getModifiers() expects exactly 0 parameters, 1 given in %s on line %d - ReflectionMethod::getModifiers() modifiers: 0x00000001 |
