From 6545f656be7e92c89f502a22c6e9b7d67c0b86ae Mon Sep 17 00:00:00 2001 From: Fabien Villepinte Date: Mon, 4 Nov 2019 13:51:40 +0100 Subject: [PATCH] Add a test for ReflectionClass:getInterfaceNames() The method was not tested against a class without interface. --- .../tests/ReflectionClass_getInterfaceNames_basic.phpt | 7 +++++++ 1 file changed, 7 insertions(+) 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) { +} -- 2.40.0