Skip to content

Commit 0564bdf

Browse files
committed
Fix the tests
1 parent fe9d420 commit 0564bdf

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

.phpunit.result.cache

Lines changed: 0 additions & 1 deletion
This file was deleted.

Negotiation/FormatNegotiator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function add(RequestMatcherInterface $requestMatcher, array $options = []
4141
$this->map[] = [$requestMatcher, $options];
4242
}
4343

44-
public function getBest($header, array $priorities = [], $strict = false)
44+
public function getBest($header, array $priorities = [], $strict = false): ?AcceptHeader
4545
{
4646
$request = $this->getRequest();
4747
$header = $header ?: $request->headers->get('Accept');

Tests/Functional/VersionTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testVersionAnnotation()
3737
'/version?query_version=1.2',
3838
[],
3939
[],
40-
['HTTP_Accept' => 'application/json']
40+
['HTTP_ACCEPT' => 'application/json']
4141
);
4242
$this->assertEquals('{"version":"test annotation"}', static::$client->getResponse()->getContent());
4343
}
@@ -49,7 +49,7 @@ public function testVersionInPathWithAnnotation()
4949
'/version/1.2',
5050
[],
5151
[],
52-
['HTTP_Accept' => 'application/json']
52+
['HTTP_ACCEPT' => 'application/json']
5353
);
5454
$this->assertEquals(
5555
'{"version":"test annotation","version_exclusion":"1.2"}',
@@ -64,7 +64,7 @@ public function testCustomHeaderVersion()
6464
'/version?query_version=3.2',
6565
[],
6666
[],
67-
['HTTP_Version-Header' => '2.1', 'HTTP_Accept' => 'application/vnd.foo.api+json;myversion=2.3']
67+
['HTTP_Version-Header' => '2.1', 'HTTP_ACCEPT' => 'application/vnd.foo.api+json;myversion=2.3']
6868
);
6969
$this->assertEquals(
7070
'{"version":"2.1","version_exclusion":"2.1"}',
@@ -79,7 +79,7 @@ public function testQueryVersion()
7979
'/version?query_version=3.2',
8080
[],
8181
[],
82-
['HTTP_Accept' => 'application/json']
82+
['HTTP_ACCEPT' => 'application/json']
8383
);
8484
$this->assertEquals('{"version":"3.2","version_exclusion":"3.2"}', static::$client->getResponse()->getContent());
8585
}
@@ -91,7 +91,7 @@ public function testAcceptHeaderVersion()
9191
'/version?query_version=3.2',
9292
[],
9393
[],
94-
['HTTP_Accept' => 'application/vnd.foo.api+json;myversion=2.3']
94+
['HTTP_ACCEPT' => 'application/vnd.foo.api+json;myversion=2.3']
9595
);
9696

9797
$response = static::$client->getResponse();
@@ -106,7 +106,7 @@ public function testDefaultVersion()
106106
'/version',
107107
[],
108108
[],
109-
['HTTP_Accept' => 'application/json']
109+
['HTTP_ACCEPT' => 'application/json']
110110
);
111111
$this->assertEquals(
112112
'{"version":"3.4.2","version_exclusion":"3.4.2"}',
@@ -121,7 +121,7 @@ public function testVersionInPath()
121121
'/version/2.3',
122122
[],
123123
[],
124-
['HTTP_Accept' => 'application/json']
124+
['HTTP_ACCEPT' => 'application/json']
125125
);
126126
$this->assertEquals(
127127
'{"version":"2.3","version_exclusion":"2.3"}',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"require-dev": {
4545
"sensio/framework-extra-bundle": "^5.2.3",
46-
"symfony/phpunit-bridge": "^4.1.8|^5.0",
46+
"symfony/phpunit-bridge": "^5.2",
4747
"symfony/asset": "^4.4|^5.0",
4848
"symfony/form": "^4.4|^5.0",
4949
"symfony/mime": "^4.4|^5.0",

0 commit comments

Comments
 (0)