Page MenuHomeDevCentral
Paste P299

/usr/local/bin/phpunit
ActivePublic

Authored by dereckson on Feb 9 2022, 17:30.
#!/bin/sh
# Case 1 - phpunit from Composer
if [ -f vendor/bin/phpunit ]; then
echo "Switching to Composer phpunit:"
PHPUNIT=vendor/bin/phpunit
elif [ -f /opt/phpunit ]; then
PHPUNIT=/opt/phpunit
else
echo "No phpunit has been found."
exit 1
fi
$PHPUNIT "$@"

Event Timeline

$ arc paste P299 | sudo tee /usr/local/bin/phpunit
$ chmod +x /usr/local/bin/phpunit