Command to generate a template for testing commands #6349
Labels
c: Tests & QA
For issues related to automated tests or making it easier to QA & test issues.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Milestone
It is possible to generate a test via
./console generate:test
. So far it is possible to generate a unit, database and integration test case. It would be nice to have the possibility to choose "command" as well. This would make it much easier to write tests for a command and the easier it is, the more likely we are writing tests for commands. Makes it also easier for plugin developers.An example for such a command test is here: https://github.com/piwik/plugin-PiwikDebugger/blob/master/tests/Unit/ListEventObserversTest.php I think.
Alternatively, - maybe this is even better - when generating a command, we could also directly create a test file for this command. So we would kinda automatically write a test for it (maybe ;) ). Therefore we could create a test example in "ExampleCommand" plugin
The text was updated successfully, but these errors were encountered: