Skip to content

Commit

Permalink
Test scripts: add ability to pass additional command line arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jul 30, 2020
1 parent 6e041de commit 010cc39
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 7 additions & 1 deletion bin/unit-tests
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@
#
# ./bin/unit-tests
#
# The script allows to pass additional PHPUnit CLI arguments.
# For instance, if you only want to run the tests for one particular sniff,
# use the following, replacing "SniffName" with the name of the target sniff:
#
# ./bin/unit-tests --filter SniffName
#

"$(pwd)/vendor/bin/phpunit" --filter WordPressVIPMinimum "$(pwd)/vendor/squizlabs/php_codesniffer/tests/AllTests.php" --no-coverage
"$(pwd)/vendor/bin/phpunit" --filter WordPressVIPMinimum "$(pwd)/vendor/squizlabs/php_codesniffer/tests/AllTests.php" --no-coverage $@
9 changes: 8 additions & 1 deletion bin/unit-tests-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@
#
# ./bin/unit-tests-coverage
#
# The script allows to pass additional PHPUnit CLI arguments.
# For instance, if you only want to run the tests with code coverage for one
# particular sniff, use the following, replacing "SniffName" with the name
# of the target sniff:
#
# ./bin/unit-tests-coverage --filter SniffName
#

"$(pwd)/vendor/bin/phpunit" --filter WordPressVIPMinimum "$(pwd)/vendor/squizlabs/php_codesniffer/tests/AllTests.php"
"$(pwd)/vendor/bin/phpunit" --filter WordPressVIPMinimum "$(pwd)/vendor/squizlabs/php_codesniffer/tests/AllTests.php" $@

0 comments on commit 010cc39

Please sign in to comment.