From 611a4862635e091a555a9d542d4458f19b276d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 23 May 2017 12:19:54 +0200 Subject: [PATCH] Fix tests --- .travis.yml | 2 +- features/bootstrap/FeatureContext.php | 1 + features/doctrine/date_filter.feature | 1 - tests/Fixtures/app/config/config.yml | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9fd625d9a9..593fdeab013 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,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 faae1e6f374..fd6e2687712 100644 --- a/features/bootstrap/FeatureContext.php +++ b/features/bootstrap/FeatureContext.php @@ -351,6 +351,7 @@ public function thereIsACompositeIdentifierObject() } $this->manager->flush(); + $this->manager->clear(); } /** diff --git a/features/doctrine/date_filter.feature b/features/doctrine/date_filter.feature index d6cba94b051..a922817b9da 100644 --- a/features/doctrine/date_filter.feature +++ b/features/doctrine/date_filter.feature @@ -10,7 +10,6 @@ Feature: Date filter on collections Then the response status code should be 200 And the response should be in JSON And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8" - And print last JSON response And the JSON should be valid according to this schema: """ { diff --git a/tests/Fixtures/app/config/config.yml b/tests/Fixtures/app/config/config.yml index baa3fe8b35b..c14e9b0f892 100644 --- a/tests/Fixtures/app/config/config.yml +++ b/tests/Fixtures/app/config/config.yml @@ -10,7 +10,6 @@ framework: enable_annotations: true serializer: enable_annotations: true - trusted_proxies: ~ test: ~ session: storage_id: 'session.storage.mock_file'