-
-
Notifications
You must be signed in to change notification settings - Fork 794
Make alert widget not access all flash data (Fixes #250) #252
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
Make alert widget not access all flash data (Fixes #250) #252
Conversation
tobias-dietz
commented
Sep 12, 2021
Q | A |
---|---|
Is bugfix? | yes |
New feature? | no |
Breaks BC? | no |
Tests pass? | yes |
Fixed issues | #250 |
Thank you for putting effort in the improvement of the Yii framework. In order for the framework and your solution to remain stable in the future, we have a unit test requirement in place. Therefore we can only accept your pull request if it is covered by unit tests. Could you add these please? Thanks! P.S. If you have any questions about the creation of unit tests? Don't hesitate to ask for support. More information about unit tests This is an automated comment, triggered by adding the label |
Found the missing spaces and added them 😄 I've also added a unit test. The tests may seem verbose but it felt nessecary since the alert widget has a nested foreach loop and can process strings as well as arrays for the differnt message types. If it's too verbose, I would suggest to remove all tests except for the last three ones. The last test tests the fix for this bug and should fail with the current alert widget implementation in master but not with the fixed implementation. |
Wow, impressive, not everyday we can see so robust testing. One tiny thing - it should be PHPUnit tests strictly, not Codeception so please change the extended test case class and implementation details there (but it should be pretty straight forward if I'm not mistaken). |
Thank you for your nice feedback 😄 I've pushed a new commit, the unit test looks now the same as the existing ones for the models ( I tried to extend Then I found https://github.com/yiisoft/yii2/blob/master/tests/TestCase.php which I think is what you meant? But it seems that this class is only part of Regarding the CHANGELOG: I couldn't find a CHANGELOG in |
Oh, right, no changelog here, weird... Anyway, it looks like I went full-auto here and treated it just like Yii 2 core while it's not the case and the few tests here are indeed Codeception ones - could you please revert the changes I've told you to do and bring back the ones you made before? I'm very very sorry for that extra work 😭 |
No problem 😄 The commit was broken either way (forgot to clean up my experiments with PHPUnit TestCase). Please have a look again. Basically, they are my original tests, only now with the Codeception |
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.
Nice PR, thank you for your contribution.
Thanks! |
Would you please apply the same to advanced app template? |