diff --git a/tests/Unit/CommandBuilderTest.php b/tests/Unit/CommandBuilderTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/CommandBuilderTest.php
+++ b/tests/Unit/CommandBuilderTest.php
@@ -22,7 +22,7 @@ class CommandBuilderTest extends ptlisShellCommandTestcase
 {
     private function readAttribute($object, string $property)
     {
-        $reflectionObject = new \ReflectionClass($object::class);
+        $reflectionObject = new \ReflectionClass(get_class($object));
         $property = $reflectionObject->getProperty($property);
         $property->setAccessible(true);
         return $property->getValue($object);
Fix retrieval of class name in older PHP versions