Run phpunit or pest depending on the project

Remove the `p` and `pf` aliases that previously only worked for PHPUnit,
and re-add them as functions that run either PHPUnit or Pest PHP based
on the project dependencies.

The checking is done within the `phpunit-or-pest` script and then used
within the new `p` and `pf` functions.
This commit is contained in:
Oliver Davies 2020-07-23 09:45:48 +01:00
parent ce9a65340e
commit a85ff2e8bb
3 changed files with 16 additions and 2 deletions

8
bin/phpunit-or-pest Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [[ -f "vendor/bin/pest" ]]; then
echo "pest"
exit 0
fi
echo "phpunit"