From 220ac6fa7c372d96610e669c02c0b21914699d82 Mon Sep 17 00:00:00 2001 From: SandroMiguel Date: Sat, 16 Mar 2024 11:32:17 +0000 Subject: [PATCH] feat(composer.json): add test:filter Run tests with filtering --- README.md | 6 ++++++ composer.json | 2 ++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 773cd71..11a7f28 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,12 @@ For running PHPUnit tests, execute: composer test ``` +To run PHPUnit tests with filtering, execute: + +``` +composer test:filter methodName ClassName path/to/file.php +``` + ### Run PHPUnit Tests with Coverage Report To run PHPUnit tests and generate a coverage report in the `log/report` directory, use: diff --git a/composer.json b/composer.json index 65ad72c..5d55b38 100644 --- a/composer.json +++ b/composer.json @@ -57,6 +57,7 @@ "psalm": "psalm --show-info=true", "logs": "tail -f ./storage/log/app.log", "test": "phpunit --colors=always", + "test:filter": "phpunit --filter", "test:coverage": "phpunit --coverage-html log/report" }, "scripts-description": { @@ -69,6 +70,7 @@ "psalm": "Run Psalm static analysis.", "logs": "Tail the application log located at ./storage/log/app.log.", "test": "Run PHPUnit tests.", + "test:filter": "Run tests with filtering.", "test:coverage": "Run PHPUnit tests and generate coverage report in log/report directory." } }