diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index aa2c720d83..69cf2a3979 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -226,7 +226,11 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { $property->setValue($object, array_pop($parameters)); } - return $property->getValue($object); + if (is_object($object)) { + return $property->getValue($object); + } + + return $property->getValue(); } return false;