From 1c8d9e09375db5edeadd6e76c1090db91c0ee775 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 31 Jan 2020 15:06:47 +0100 Subject: [PATCH 1/3] allow JMS Serializer 3 in tests --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4b3621043..ee999731f 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ "symfony/templating": "^3.4|^4.3", "phpoption/phpoption": "^1.1", "jms/serializer-bundle": "^2.3.1|^3.0", - "jms/serializer": "^1.13|^2.0", + "jms/serializer": "^1.13|^2.0|^3.0", "psr/http-message": "^1.0", "friendsofphp/php-cs-fixer": "^2.0" }, From 98c1c322b2426ee2ddb21d79fcca797ca0e90632 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 31 Jan 2020 13:54:14 +0100 Subject: [PATCH 2/3] prevent exceptions caused by missing formats --- Tests/Functional/ConfigurationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tests/Functional/ConfigurationTest.php b/Tests/Functional/ConfigurationTest.php index 4c0b5ff53..71b83250e 100644 --- a/Tests/Functional/ConfigurationTest.php +++ b/Tests/Functional/ConfigurationTest.php @@ -40,9 +40,10 @@ public function testToolbar() '/_profiler/empty/search/results?limit=10', [], [], - ['HTTP_Accept' => 'application/json'] + ['HTTP_Accept' => 'application/xml'] ); + $this->assertSame(200, $client->getResponse()->getStatusCode()); $this->assertSame('text/html; charset=UTF-8', $client->getResponse()->headers->get('Content-Type')); } } From e314eec02945b1ab6912571dc41cefbc114d97f9 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 31 Jan 2020 15:13:01 +0100 Subject: [PATCH 3/3] ensure kernel is shut down after each test --- Tests/Functional/ExceptionListenerTest.php | 5 ----- Tests/Functional/RoutingTest.php | 5 ----- Tests/Functional/VersionTest.php | 5 ----- 3 files changed, 15 deletions(-) diff --git a/Tests/Functional/ExceptionListenerTest.php b/Tests/Functional/ExceptionListenerTest.php index 395b6c617..0750e8c1e 100644 --- a/Tests/Functional/ExceptionListenerTest.php +++ b/Tests/Functional/ExceptionListenerTest.php @@ -30,11 +30,6 @@ public static function tearDownAfterClass() parent::tearDownAfterClass(); } - protected function tearDown(): void - { - // prevent kernel shutdown - } - public function testBundleListenerHandlesExceptionsInRestZones() { static::$client->request('GET', '/api/test'); diff --git a/Tests/Functional/RoutingTest.php b/Tests/Functional/RoutingTest.php index e60d0ee5c..adeb2d6b0 100644 --- a/Tests/Functional/RoutingTest.php +++ b/Tests/Functional/RoutingTest.php @@ -27,11 +27,6 @@ public static function tearDownAfterClass() parent::tearDownAfterClass(); } - protected function tearDown(): void - { - // prevent kernel shutdown - } - public function testPostControllerRoutesAreRegistered() { static::$client->request('GET', '/posts/1'); diff --git a/Tests/Functional/VersionTest.php b/Tests/Functional/VersionTest.php index 5aa55205e..dcc505b09 100644 --- a/Tests/Functional/VersionTest.php +++ b/Tests/Functional/VersionTest.php @@ -30,11 +30,6 @@ public static function tearDownAfterClass() parent::tearDownAfterClass(); } - protected function tearDown(): void - { - // prevent kernel shutdown - } - public function testVersionAnnotation() { static::$client->request(