We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ 52-71 (lines=20) @@ | ||
| 49 | } |
|
| 50 | EOF; |
|
| 51 | ||
| 52 | public function testNotAuthenticatedUserAccessToUserName() |
|
| 53 | { |
|
| 54 | $expected = [ |
|
| 55 | 'data' => [ |
|
| 56 | 'user' => [ |
|
| 57 | 'name' => null, |
|
| 58 | ], |
|
| 59 | ], |
|
| 60 | 'extensions' => [ |
|
| 61 | 'warnings' => [ |
|
| 62 | [ |
|
| 63 | 'message' => 'Access denied to this field.', |
|
| 64 | 'locations' => [['line' => 1, 'column' => 24]], |
|
| 65 | ], |
|
| 66 | ], |
|
| 67 | ], |
|
| 68 | ]; |
|
| 69 | ||
| 70 | $this->assertResponse($this->userNameQuery, $expected, static::ANONYMOUS_USER); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function testFullyAuthenticatedUserAccessToUserName() |
|
| 74 | { |
|
| @@ 109-139 (lines=31) @@ | ||
| 106 | $this->assertResponse($this->userRolesQuery, $expected, static::USER_ADMIN); |
|
| 107 | } |
|
| 108 | ||
| 109 | public function testUserForbiddenField() |
|
| 110 | { |
|
| 111 | $expected = [ |
|
| 112 | 'data' => [ |
|
| 113 | 'user' => null, |
|
| 114 | ], |
|
| 115 | 'extensions' => [ |
|
| 116 | 'warnings' => [ |
|
| 117 | [ |
|
| 118 | 'message' => 'Access denied to this field.', |
|
| 119 | 'locations' => [ |
|
| 120 | [ |
|
| 121 | 'line' => 3, |
|
| 122 | 'column' => 5, |
|
| 123 | ], |
|
| 124 | ], |
|
| 125 | ], |
|
| 126 | ], |
|
| 127 | ], |
|
| 128 | ]; |
|
| 129 | ||
| 130 | $query = <<<EOF |
|
| 131 | query MyQuery { |
|
| 132 | user { |
|
| 133 | forbidden |
|
| 134 | } |
|
| 135 | } |
|
| 136 | EOF; |
|
| 137 | ||
| 138 | $this->assertResponse($query, $expected, static::USER_ADMIN); |
|
| 139 | } |
|
| 140 | ||
| 141 | public function testUserAccessToUserFriends() |
|
| 142 | { |
|