We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 99-129 (lines=31) @@ | ||
96 | $this->assertResponse($this->userNameQuery, $expected, static::ANONYMOUS_USER, 'access'); |
|
97 | } |
|
98 | ||
99 | public function testNonAuthenticatedUserAccessSecuredFieldWhichInitiallyResolvesToArray() |
|
100 | { |
|
101 | $expected = [ |
|
102 | 'data' => [ |
|
103 | 'youShallNotSeeThisUnauthenticated' => null, |
|
104 | ], |
|
105 | 'extensions' => [ |
|
106 | 'warnings' => [ |
|
107 | [ |
|
108 | 'message' => 'Access denied to this field.', |
|
109 | 'locations' => [ |
|
110 | [ |
|
111 | 'line' => 2, |
|
112 | 'column' => 3, |
|
113 | ], |
|
114 | ], |
|
115 | 'path' => ['youShallNotSeeThisUnauthenticated'], |
|
116 | ], |
|
117 | ], |
|
118 | ], |
|
119 | ]; |
|
120 | $query = <<<'EOF' |
|
121 | { |
|
122 | youShallNotSeeThisUnauthenticated { |
|
123 | secretValue |
|
124 | youAreAuthenticated |
|
125 | } |
|
126 | } |
|
127 | EOF; |
|
128 | $this->assertResponse($query, $expected, static::ANONYMOUS_USER, 'access'); |
|
129 | } |
|
130 | ||
131 | public function testFullyAuthenticatedUserAccessToUserName() |
|
132 | { |
|
@@ 167-198 (lines=32) @@ | ||
164 | $this->assertResponse($this->userRolesQuery, $expected, static::USER_ADMIN, 'access'); |
|
165 | } |
|
166 | ||
167 | public function testUserForbiddenField() |
|
168 | { |
|
169 | $expected = [ |
|
170 | 'data' => [ |
|
171 | 'user' => null, |
|
172 | ], |
|
173 | 'extensions' => [ |
|
174 | 'warnings' => [ |
|
175 | [ |
|
176 | 'message' => 'Access denied to this field.', |
|
177 | 'locations' => [ |
|
178 | [ |
|
179 | 'line' => 3, |
|
180 | 'column' => 5, |
|
181 | ], |
|
182 | ], |
|
183 | 'path' => ['user', 'forbidden'], |
|
184 | ], |
|
185 | ], |
|
186 | ], |
|
187 | ]; |
|
188 | ||
189 | $query = <<<'EOF' |
|
190 | query MyQuery { |
|
191 | user { |
|
192 | forbidden |
|
193 | } |
|
194 | } |
|
195 | EOF; |
|
196 | ||
197 | $this->assertResponse($query, $expected, static::USER_ADMIN, 'access'); |
|
198 | } |
|
199 | ||
200 | public function testUserAccessToUserFriends() |
|
201 | { |