-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Added more tests for PropertyAccess #16155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
$object->firstName = array('Bernhard'); | ||
|
||
$propertyAccessor->getValue($object, 'firstName[1]'); | ||
$this->assertSame(array('Bernhard'), $object->firstName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes no sense as its not executed currently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to catch the exception if you want to test what the tests says
be7b54d
to
18759e1
Compare
18759e1
to
378db75
Compare
Thank you @pierredup. |
This PR was merged into the 2.7 branch. Discussion ---------- Added more tests for PropertyAccess | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This is a follow up for [16090#issuecomment-145183635](#16090 (comment)) Commits ------- 378db75 Added more tests for PropertyAccess
$object->firstName = array('Bernhard'); | ||
|
||
try { | ||
$propertyAccessor->getValue($object, 'firstName[1]'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing a fail()
after wards. Otherwise the test also passed if the exception is not thrown which would be wrong.
This is a follow up for 16090#issuecomment-145183635