diff --git a/src/Utilities/Reflection.php b/src/Utilities/Reflection.php index b03a0bd..e45ad09 100644 --- a/src/Utilities/Reflection.php +++ b/src/Utilities/Reflection.php @@ -662,7 +662,7 @@ class Reflection } /** - * Sets value of given property + * Sets value of given property in given object * * @param mixed $object Object that should contains given property * @param string $property Name of the property diff --git a/tests/Utilities/ReflectionTest.php b/tests/Utilities/ReflectionTest.php index 69ce170..3a178a6 100644 --- a/tests/Utilities/ReflectionTest.php +++ b/tests/Utilities/ReflectionTest.php @@ -484,9 +484,7 @@ class ReflectionTest extends BaseTestCase public function testSetPropertyValueUsingNotExistingProperty($object, $property) { $this->setExpectedException(NotExistingPropertyException::class); - - $object = new \stdClass(); - Reflection::setPropertyValue($object, 'test', 'test test test'); + Reflection::setPropertyValue($object, $property, 'test test test'); } /**