diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-04 13:51:40 +0100 |
---|---|---|
committer | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-11-04 13:51:40 +0100 |
commit | 6545f656be7e92c89f502a22c6e9b7d67c0b86ae (patch) | |
tree | 6e02998dfb96420277baec21297225f4c507a49d | |
parent | 00c9c480eb1f19b50f07fe6d51a018a31870d109 (diff) | |
download | php-git-6545f656be7e92c89f502a22c6e9b7d67c0b86ae.tar.gz |
Add a test for ReflectionClass:getInterfaceNames()
The method was not tested against a class without interface.
-rw-r--r-- | ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt b/ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt index 6681c9f316..ff8dca4703 100644 --- a/ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt +++ b/ext/reflection/tests/ReflectionClass_getInterfaceNames_basic.phpt @@ -11,8 +11,13 @@ interface Bar { } class Baz implements Foo, Bar { } +class Qux {} + $rc1 = new ReflectionClass("Baz"); var_dump($rc1->getInterfaceNames()); + +$rc2 = new ReflectionClass("Qux"); +var_dump($rc2->getInterfaceNames()); ?> --EXPECT-- array(2) { @@ -21,3 +26,5 @@ array(2) { [1]=> string(3) "Bar" } +array(0) { +} |