Skip to content

Commit

Permalink
Merge pull request #16 from SandroMiguel/feat/test-filter
Browse files Browse the repository at this point in the history
feat(composer.json): add test:filter
  • Loading branch information
SandroMiguel authored Mar 16, 2024
2 parents 1f2e8f5 + 220ac6f commit c4d12ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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."
}
}

0 comments on commit c4d12ea

Please sign in to comment.