diff --git a/console-commands.md b/console-commands.md index 8d4ed49f..9c842a41 100644 --- a/console-commands.md +++ b/console-commands.md @@ -310,3 +310,13 @@ Deletes records in "system_files" table that do not belong to any other model. To also delete records that have no associated file in the local storage, pass the `--missing-files` option. php artisan winter:util purge orphans --missing-files + + +#### Run unit tests + +Runs the unit tests for the entire project, a specific plugin, or the Winter CMS core. + +To run the entire project's unit tests: + +```bash +php artisan winter:test diff --git a/help-unit-testing.md b/help-unit-testing.md index 09088dea..de63f5e6 100644 --- a/help-unit-testing.md +++ b/help-unit-testing.md @@ -6,7 +6,7 @@ ## Testing plugins -Individual plugin test cases can be run by running `../../../vendor/bin/phpunit` in the plugin's base directory (ex. `plugins/acme/demo`. +Individual plugin test cases can be run by running [the `winter:test` command](./console/commands/#winter-test) with the `--p|plugin=` option. ### Creating plugin tests @@ -102,7 +102,7 @@ To perform unit testing on the core Winter files, you should download a developm ### Unit tests -Unit tests can be performed by running `vendor/bin/phpunit` in the root directory of your Winter CMS installation. +Unit tests can be performed by running [the `winter:test` command](./console/commands/#winter-test) with the `--o|-core` option. ### Functional tests