summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/traits003.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/tests/traits003.phpt')
-rw-r--r--ext/reflection/tests/traits003.phpt30
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/reflection/tests/traits003.phpt b/ext/reflection/tests/traits003.phpt
new file mode 100644
index 0000000..c569a8e
--- /dev/null
+++ b/ext/reflection/tests/traits003.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Reflection and Traits
+--FILE--
+<?php
+
+abstract class foo {
+}
+
+trait bar {
+
+}
+
+final class baz {
+
+}
+
+$x = new ReflectionClass('foo');
+var_dump($x->isTrait());
+
+$x = new ReflectionClass('bar');
+var_dump($x->isTrait());
+
+$x = new ReflectionClass('baz');
+var_dump($x->isTrait());
+
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(false)