From b668850aa16a73a1c93e9caab46627ef25e9369c Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 3 Dec 2020 16:18:01 +0100 Subject: [PATCH] Fix filesystem tests Signed-off-by: Roeland Jago Douma --- tests/lib/TestCase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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;