Skip to content

Commit

Permalink
minor #2069 backport fixes from master (xabbuh)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.x branch (closes #2069).

Discussion
----------

backport fixes from master

#2066, #2067, and #2068 should have actually been merged into `2.x`

Commits
-------

e314eec ensure kernel is shut down after each test
98c1c32 prevent exceptions caused by missing formats
1c8d9e0 allow JMS Serializer 3 in tests
  • Loading branch information
xabbuh committed Jan 31, 2020
2 parents 30a544b + e314eec commit 3a5c187
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
3 changes: 2 additions & 1 deletion Tests/Functional/ConfigurationTest.php
Expand Up @@ -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'));
}
}
5 changes: 0 additions & 5 deletions Tests/Functional/ExceptionListenerTest.php
Expand Up @@ -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');
Expand Down
5 changes: 0 additions & 5 deletions Tests/Functional/RoutingTest.php
Expand Up @@ -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');
Expand Down
5 changes: 0 additions & 5 deletions Tests/Functional/VersionTest.php
Expand Up @@ -30,11 +30,6 @@ public static function tearDownAfterClass()
parent::tearDownAfterClass();
}

protected function tearDown(): void
{
// prevent kernel shutdown
}

public function testVersionAnnotation()
{
static::$client->request(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -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"
},
Expand Down

0 comments on commit 3a5c187

Please sign in to comment.