We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ 69-90 (lines=22) @@ | ||
66 | $this->assertResponse($this->userNameQuery, [], static::ANONYMOUS_USER, 'access'); |
|
67 | } |
|
68 | ||
69 | public function testNotAuthenticatedUserAccessToUserName() |
|
70 | { |
|
71 | $expected = [ |
|
72 | 'data' => [ |
|
73 | 'user' => [ |
|
74 | 'name' => null, |
|
75 | ], |
|
76 | ], |
|
77 | 'extensions' => [ |
|
78 | 'warnings' => [ |
|
79 | [ |
|
80 | 'message' => 'Access denied to this field.', |
|
81 | 'locations' => [['line' => 1, 'column' => 16]], |
|
82 | 'path' => ['user', 'name'], |
|
83 | 'category' => 'user', |
|
84 | ], |
|
85 | ], |
|
86 | ], |
|
87 | ]; |
|
88 | ||
89 | $this->assertResponse($this->userNameQuery, $expected, static::ANONYMOUS_USER, 'access'); |
|
90 | } |
|
91 | ||
92 | public function testFullyAuthenticatedUserAccessToUserName() |
|
93 | { |
|
@@ 128-160 (lines=33) @@ | ||
125 | $this->assertResponse($this->userRolesQuery, $expected, static::USER_ADMIN, 'access'); |
|
126 | } |
|
127 | ||
128 | public function testUserForbiddenField() |
|
129 | { |
|
130 | $expected = [ |
|
131 | 'data' => [ |
|
132 | 'user' => null, |
|
133 | ], |
|
134 | 'extensions' => [ |
|
135 | 'warnings' => [ |
|
136 | [ |
|
137 | 'message' => 'Access denied to this field.', |
|
138 | 'locations' => [ |
|
139 | [ |
|
140 | 'line' => 3, |
|
141 | 'column' => 5, |
|
142 | ], |
|
143 | ], |
|
144 | 'path' => ['user', 'forbidden'], |
|
145 | 'category' => 'user', |
|
146 | ], |
|
147 | ], |
|
148 | ], |
|
149 | ]; |
|
150 | ||
151 | $query = <<<'EOF' |
|
152 | query MyQuery { |
|
153 | user { |
|
154 | forbidden |
|
155 | } |
|
156 | } |
|
157 | EOF; |
|
158 | ||
159 | $this->assertResponse($query, $expected, static::USER_ADMIN, 'access'); |
|
160 | } |
|
161 | ||
162 | public function testUserAccessToUserFriends() |
|
163 | { |