-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[Form] add test for ArrayChoiceList handling null #17832
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
| { | ||
| parent::setUp(); | ||
|
|
||
| $this->object = new \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.
this was broken because it was initialized after getChoices is called. so $this->object was actually null.
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 should maybe just put it before the call to parent::setUp() instead of removing it and keep using $this->object in getChoices()
|
Looks like this breaks the tests |
|
Using |
ffac441 to
00e3819
Compare
|
Fixed |
|
👍 Status: Reviewed |
|
Thank you @Tobion. |
This PR was merged into the 2.7 branch. Discussion ---------- [Form] add test for ArrayChoiceList handling null | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - I found this bug but then realised that it was already fixed in #17511. So this just adds a test. Commits ------- 00e3819 [Form] add test for ArrayChoiceList handling null
I found this bug but then realised that it was already fixed in #17511.
So this just adds a test.