We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 71-79 (lines=9) @@ | ||
68 | * @param $uri |
|
69 | * @dataProvider graphQLEndpointUriProvider |
|
70 | */ |
|
71 | public function testEndpointAction($uri) |
|
72 | { |
|
73 | $client = static::createClient(['test_case' => 'connectionWithCORS']); |
|
74 | ||
75 | $client->request('GET', $uri, ['query' => $this->friendsQuery], [], ['CONTENT_TYPE' => 'application/graphql', 'HTTP_Origin' => 'http://example.com']); |
|
76 | $result = $client->getResponse()->getContent(); |
|
77 | $this->assertEquals(['data' => $this->expectedData], json_decode($result, true), $result); |
|
78 | $this->assertCORSHeadersExists($client); |
|
79 | } |
|
80 | ||
81 | public function graphQLEndpointUriProvider() |
|
82 | { |
|
@@ 296-304 (lines=9) @@ | ||
293 | $this->assertCORSHeadersExists($client); |
|
294 | } |
|
295 | ||
296 | public function testNoCORSHeadersIfOriginHeaderNotExists() |
|
297 | { |
|
298 | $client = static::createClient(['test_case' => 'connectionWithCORS']); |
|
299 | ||
300 | $client->request('GET', '/', ['query' => $this->friendsQuery], [], ['CONTENT_TYPE' => 'application/graphql']); |
|
301 | $result = $client->getResponse()->getContent(); |
|
302 | $this->assertEquals(['data' => $this->expectedData], json_decode($result, true), $result); |
|
303 | $this->assertCORSHeadersNotExists($client); |
|
304 | } |
|
305 | ||
306 | private function assertCORSHeadersNotExists(Client $client) |
|
307 | { |