summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/reflectionClass_getModifiers_basic.phpt')
-rw-r--r--ext/reflection/tests/reflectionClass_getModifiers_basic.phpt39
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt b/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt
new file mode 100644
index 0000000000..5d2592d17e
--- /dev/null
+++ b/ext/reflection/tests/reflectionClass_getModifiers_basic.phpt
@@ -0,0 +1,39 @@
+--TEST--
+ReflectionClass::getModifiers()
+--SKIPIF--
+<?php extension_loaded('reflection') or die('skip'); ?>
+--CREDITS--
+Felix De Vliegher <felix.devliegher@gmail.com>
+--FILE--
+<?php
+
+class a {}
+abstract class b {}
+final class c {}
+interface d {}
+class e implements d {}
+interface f extends d {}
+class g extends b {}
+
+function dump_modifiers($class) {
+ $obj = new ReflectionClass($class);
+ var_dump($obj->getModifiers());
+}
+
+dump_modifiers('a');
+dump_modifiers('b');
+dump_modifiers('c');
+dump_modifiers('d');
+dump_modifiers('e');
+dump_modifiers('f');
+dump_modifiers('g');
+
+?>
+--EXPECT--
+int(0)
+int(32)
+int(64)
+int(128)
+int(524288)
+int(524416)
+int(0) \ No newline at end of file