Last active
August 29, 2015 14:11
-
-
Save paulstatezny/f0ec8dbfc9f604a7f757 to your computer and use it in GitHub Desktop.
Fish function to run PHPUnit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function unit | |
# Remove logging portion of phpunit configuration | |
sed -i .sedbackup 's/\<\/logging\>//g' ./phpunit.xml | |
sed -i .sedbackup 's/\<logging\>//g' ./phpunit.xml | |
rm *.sedbackup | |
if set -q argv[1] | |
vendor/bin/phpunit --filter $argv[1] | |
else | |
vendor/bin/phpunit | |
end | |
git checkout phpunit.xml | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ unit
$ unit SyncService
Run this function in the
src
directory of a PHP application. The function:<logging>
section of the PHPUnit configuration (will speed up execution).Optionally, you can provide a filter argument to the function and it will only run test files whose names match the filter. (Case sensitive.)