Created
December 15, 2015 18:42
-
-
Save aapis/4f8394b61b310aaafbcc to your computer and use it in GitHub Desktop.
Symfony test/build commands (for use in local development)
This file contains 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
# Really simple wrappers for running PHPUnit and testing your app's endpoints | |
# Usage | |
# run_phpunit Path/To/Bundle | |
run_phpunit(){ | |
local bundle=$1 | |
local config="app/phpunit.xml.dist" | |
if [ -f $config ] | |
then | |
phpunit src/$bundle/Tests -c $config | |
else | |
echo "File not found: $config" | |
fi | |
} | |
# Usage | |
# test_endpoint save "test=1&test2=['derp','herp','qwop']" | |
test_endpoint(){ | |
local endpoint=$1 | |
local data=$2 | |
curl -X POST http://localhost:8000/$endpoint --data $data && echo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment