We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 97-120 (lines=24) @@ | ||
| 94 | $client->getResponse()->getContent(); |
|
| 95 | } |
|
| 96 | ||
| 97 | public function testEndpointActionWithVariables() |
|
| 98 | { |
|
| 99 | $client = static::createClient(['test_case' => 'connection']); |
|
| 100 | ||
| 101 | $query = <<<EOF |
|
| 102 | query FriendsQuery(\$firstFriends: Int) { |
|
| 103 | user { |
|
| 104 | friends(first: \$firstFriends) { |
|
| 105 | totalCount |
|
| 106 | edges { |
|
| 107 | friendshipTime |
|
| 108 | node { |
|
| 109 | name |
|
| 110 | } |
|
| 111 | } |
|
| 112 | } |
|
| 113 | } |
|
| 114 | } |
|
| 115 | EOF; |
|
| 116 | ||
| 117 | $client->request('GET', '/', [], [], ['CONTENT_TYPE' => 'application/json'], json_encode(['query' => $query, 'variables' => '{"firstFriends": 2}'])); |
|
| 118 | $result = $client->getResponse()->getContent(); |
|
| 119 | $this->assertEquals(['data' => $this->expectedData], json_decode($result, true), $result); |
|
| 120 | } |
|
| 121 | ||
| 122 | /** |
|
| 123 | * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException |
|
| @@ 126-139 (lines=14) @@ | ||
| 123 | * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException |
|
| 124 | * @expectedExceptionMessage Variables are invalid JSON |
|
| 125 | */ |
|
| 126 | public function testEndpointActionWithInvalidVariables() |
|
| 127 | { |
|
| 128 | $client = static::createClient(['test_case' => 'connection']); |
|
| 129 | ||
| 130 | $query = <<<EOF |
|
| 131 | query { |
|
| 132 | user |
|
| 133 | } |
|
| 134 | EOF; |
|
| 135 | ||
| 136 | $client->request('GET', '/', ['query' => $query, 'variables' => '"firstFriends": 2}']); |
|
| 137 | $result = $client->getResponse()->getContent(); |
|
| 138 | $this->assertEquals(['data' => $this->expectedData], json_decode($result, true), $result); |
|
| 139 | } |
|
| 140 | ||
| 141 | public function testEndpointActionWithOperationName() |
|
| 142 | { |
|