From 9410478b33a3b25c178c9a1788ad6ec75cd2bec0 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 14:55:47 -0400 Subject: [PATCH 1/2] adjusting console commands to not override index --- src/console/PestController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/console/PestController.php b/src/console/PestController.php index 7996eb5..a8f1ccc 100644 --- a/src/console/PestController.php +++ b/src/console/PestController.php @@ -21,6 +21,8 @@ class PestController extends Controller public ?string $namespace = null; + public $defaultAction = 'test'; + public function options($actionID): array { if (in_array($actionID, ['init', 'generate-mixins'], true)) { @@ -39,13 +41,13 @@ public function options($actionID): array } /** - * Run the Pest tests with `php craft pest`. This is a convienence function that internally calls the + * Run the Pest tests with `php craft pest/test`. This is a convenience function that internally calls the * `pest/init` method and then `./vendor/bin/pest` executable. * * You may pass any pest options to this command by separating them with a `--`. For example, to filter * down to a specific test you may run `php craft pest -- --filter="renders the homepage"`. */ - public function actionIndex() + public function actionTest() { $this->runInit(); $this->runTests(); From b9705a0759b0358943fcff25fa0c6dc89b1a7f36 Mon Sep 17 00:00:00 2001 From: markhuot Date: Mon, 30 Sep 2024 18:56:53 +0000 Subject: [PATCH 2/2] GitHub action updating docs --- docs/cli.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cli.md b/docs/cli.md index e3af171..05da6c9 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -1,7 +1,7 @@ # CLI Commands -## actionIndex() -Run the Pest tests with `php craft pest`. This is a convienence function that internally calls the +## actionTest() +Run the Pest tests with `php craft pest/test`. This is a convenience function that internally calls the `pest/init` method and then `./vendor/bin/pest` executable. You may pass any pest options to this command by separating them with a `--`. For example, to filter