-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Security] Fix tests in 2.8 #15961
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
[Security] Fix tests in 2.8 #15961
Conversation
Thank you @wouterj. |
Tests are still broken for me :( |
@wouterj please check your changes. The tests you modified here are failing |
That's not enough to fix the tests:
|
protected function getSupportedClasses() | ||
{ | ||
return array('stdClass'); | ||
return array('AbstractVoterTest_Object'); |
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 change should be reverted, it should accept stdClass.
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.
Afaics, this should fix the tests (but I'm on a mobile now, sp can't be 100% sure).
* The `LegacyAbstractVoterTest` class is not needed anymore, tests have been moved to the `AbstractVoterTest` class tagging them with the legacy group. * Tests are applied on `stdClass` object instances. Thus, the legacy voter fixture class must not support `AbstractVoterTest_Object` instances, but support `stdClass` objects instead. * Remove a test that checked for a `BadMethodCallException` being thrown. This seems to have been added accidentally in symfony#15961.
* The `LegacyAbstractVoterTest` class is not needed anymore, tests have been moved to the `AbstractVoterTest` class tagging them with the legacy group. * Tests are applied on `stdClass` object instances. Thus, the legacy voter fixture class must not support `AbstractVoterTest_Object` instances, but support `stdClass` objects instead. * Remove a test that checked for a `BadMethodCallException` being thrown. This seems to have been added accidentally in symfony#15961.
* The `LegacyAbstractVoterTest` class is not needed anymore, tests have been moved to the `AbstractVoterTest` class tagging them with the legacy group. * Tests are applied on `stdClass` object instances. Thus, the legacy voter fixture class must not support `AbstractVoterTest_Object` instances, but support `stdClass` objects instead. * Remove a test that checked for a `BadMethodCallException` being thrown. This seems to have been added accidentally in symfony#15961.
This PR was merged into the 2.8 branch. Discussion ---------- [Security] fix tests for the `AbstractVoter` class | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15961, #15968 | License | MIT | Doc PR | * The `LegacyAbstractVoterTest` class is not needed anymore, tests have been moved to the `AbstractVoterTest` class tagging them with the legacy group. * Tests are applied on `stdClass` object instances. Thus, the legacy voter fixture class must not support `AbstractVoterTest_Object` instances, but support `stdClass` objects instead. * Remove a test that checked for a `BadMethodCallException` being thrown. This seems to have been added accidentally in #15961. Commits ------- 9fe3b76 fix tests for the `AbstractVoter` class
ping @fabpot