Eğer testlerinizi composer komutu ile çalıştırmak isterseniz, aşağıdaki örneği takip edebilirsiniz.


composer.json


{
...
"scripts": {
...
"cache": [
"rm -rf app/cache/*"
],
"composer": [
"composer self-update",
"composer install --no-interaction"
],
"doctrine": [
"php app/doctrine:generate:entities AppBundle --no-backup --env=test",
"php app/doctrine:schema:create --no-interaction --env=test",
"php app/doctrine:schema:update --force --no-interaction --no-debug --env=test"
],
"fixtures": [
"php doctrine:fixtures:load --no-interaction --no-debug --env=test"
],
"styling": [
"php app/php-cs-fixer fix --dry-run --verbose -diff"
],
"behat": [
"php app/behat --suite=app --format=progress"
],
"security": [
"php app/console security:check"
],
"tests": [
"@security",
"@styling",
"@cache",
"@composer",
"@doctrine",
"@styling",
"@fixtures",
"@behat"
]
...
}
...
}

Komutlar


$ composer security
$ composer styling
$ composer ...
$ composer tests