Skip to content

Commit

Permalink
Merge pull request #32 from markhuot/adjusting-console-commands
Browse files Browse the repository at this point in the history
adjusting console commands to not override index
  • Loading branch information
markhuot authored Sep 30, 2024
2 parents bf0524f + b9705a0 commit b94dcb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/console/PestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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();
Expand Down

0 comments on commit b94dcb4

Please sign in to comment.