Conversation
| $propsArr = array_merge($parentPropsArr, $propsArr); | ||
| foreach ($propsArr as $key => $property) { | ||
| $parentPropsArr[$key] = $property; | ||
| } |
There was a problem hiding this comment.
The behaviour is different: please add a test where the parent class and the child class has a private variable with the same name, and the test verifies that the ReflectionProperty is the one of the child instead the one of the parent
There was a problem hiding this comment.
There was a problem hiding this comment.
No, the test only assert that $a3 is in the properties list returned by the helper.
What you have to test, and then to ensure, is that the ReflectionProperty returned refers to the $a3 of ReflectionHelperTestChild instead of ReflectionHelperTestParent one.
There was a problem hiding this comment.
👍
I would suggest to put the test in the scope they are addressing, so into tests/DeepCopyTest/Reflection/ReflectionHelperTest.php. @mnapoli what do you think?
There was a problem hiding this comment.
I think it's fine as it is, it's implemented as a functional test so it tests a behavior, not ReflectionHelperTest directly.
466027a to
3f763a4
Compare
Follow up of #45.