From 4e600ec599509a105687a3b55f84f31027436248 Mon Sep 17 00:00:00 2001 From: Meritoo Date: Sat, 3 Nov 2018 08:16:49 +0100 Subject: [PATCH] Utilities > Reflection > setPropertyValue() method > fix description and test --- src/Utilities/Reflection.php | 2 +- tests/Utilities/ReflectionTest.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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'); } /**