diff --git a/.travis.yml b/.travis.yml index 0c5fbb9b409..e645968fd76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ install: script: - if [[ $coverage = 1 ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-php build/cov/coverage-phpunit.cov; else vendor/bin/phpunit; fi - - if [[ $coverage = 1 ]]; then for f in $(find features -name '*.feature'); do FEATURE=${f//\//_} phpdbg -qrr vendor/bin/behat --profile coverage $f; done; else vendor/bin/behat; fi + - if [[ $coverage = 1 ]]; then for f in $(find features -name '*.feature'); do FEATURE=${f//\//_} phpdbg -qrr vendor/bin/behat --profile coverage $f || exit $?; done; else vendor/bin/behat; fi - if [[ $coverage = 1 ]]; then phpdbg -qrr phpcov.phar merge --clover build/logs/clover.xml build/cov; fi - tests/Fixtures/app/console api:swagger:export > swagger.json && swagger validate swagger.json && rm swagger.json - if [[ $lint = 1 ]]; then php php-cs-fixer.phar fix --dry-run --diff --no-ansi; fi diff --git a/features/bootstrap/FeatureContext.php b/features/bootstrap/FeatureContext.php index 54bb7015b03..3445b4dcfce 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -401,6 +401,7 @@ public function thereIsACompositeIdentifierObject() } $this->manager->flush(); + $this->manager->clear(); } /** @@ -472,16 +473,15 @@ public function thereIsARelatedDummyWithFriends($nb) } /** - * @Given there is an answer :answer to the question :question + * @Given there is an answer ":answer" to the question ":question" */ - public function thereIsAnAnswerToTheQuestion($a, $q) + public function thereIsAnAnswerToTheQuestion(string $a, string $q) { $answer = new Answer(); $answer->setContent($a); $question = new Question(); $question->setContent($q); - $question->setAnswer($answer); $this->manager->persist($answer);