123456789101112131415161718192021222324 |
- #!/usr/bin/env bash
- display_help() {
- echo -e "Description:
- Run unit tests with xdebug (you need to turn on xdebug in IDE as usual)
- Usage:
- bin/test/unit-xdebug <unit_test_path>
- Arguments:
- <unit_test_path> Specify a path to your test or folder with tests Ex: bin/test/unit-xdebug app/code/Vendor/Module
- Options:
- -h, --help Display help message"
- }
- if [[ $1 == "-h" || $1 == "--help" ]]; then
- display_help
- elif [[ -z $1 ]]; then
- echo -e "Please specify a path to your test or folder with tests (ex. app/code/Vendor/Module)"
- else
- bin/php -d xdebug.start_with_request=yes vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist /var/www/html/"$1"
- fi
|