- Issue created by @dydave
- Merge request !130Issue #3514774 by dydave: Added basic PHPUNIT Tests coverage for... → (Merged) created by dydave
- 🇫🇷France dydave
Quick follow-up on this issue:
Added very basic Functional Tests coverage for the
ToolbarController
class with the new classAdminToolbarToolsToolbarControllerTest
:
At least with these Tests, all the methods and code in theToolbarController
class will be executed, which should allow us to detect deprecation messages, various errors, crashes, breaking changes in merge requests, etc...The tests don't actually check whether each action effectively "worked", in the sense:
Each task is not tested specifically, for example, there is are no specific checks on caches, registries, etc...
But instead, the Tests execute each method's code from theToolbarController
class and check it completed without error (display the expected success message).Automated tests all seemed to be passing 🟢, therefore, I went ahead and merged the changes above at #3.
With these tests in place, there should be at least some very basic Functional validation for all the pending merge requests making changes to the
ToolbarController
class, see in particular related tickets.Important note: Fixed a minor error in the file
admin_toolbar.libraries.yml
, recently introduced in commit:
https://git.drupalcode.org/project/admin_toolbar/-/commit/d7c8da0ed63729...
Moved the added CSS library at the bottom of the file, without breaking thetoolbar.tree
library.Marking issue Fixed for now.
Feel free to let us know if you have any questions or concerns on any of the changes merged in this ticket or the project in general, we would certainly be glad to help.
Thanks in advance! Automatically closed - issue fixed for 2 weeks with no activity.