@@ 251-266 (lines=16) @@ | ||
248 | ); |
|
249 | } |
|
250 | ||
251 | public function testForwardedForHeadersWorkingFalse() { |
|
252 | $this->config->expects($this->once()) |
|
253 | ->method('getSystemValue') |
|
254 | ->with('trusted_proxies', []) |
|
255 | ->willReturn(['1.2.3.4']); |
|
256 | $this->request->expects($this->once()) |
|
257 | ->method('getRemoteAddress') |
|
258 | ->willReturn('1.2.3.4'); |
|
259 | ||
260 | $this->assertFalse( |
|
261 | self::invokePrivate( |
|
262 | $this->checkSetupController, |
|
263 | 'forwardedForHeadersWorking' |
|
264 | ) |
|
265 | ); |
|
266 | } |
|
267 | ||
268 | public function testForwardedForHeadersWorkingTrue() { |
|
269 | $this->config->expects($this->once()) |
|
@@ 268-283 (lines=16) @@ | ||
265 | ); |
|
266 | } |
|
267 | ||
268 | public function testForwardedForHeadersWorkingTrue() { |
|
269 | $this->config->expects($this->once()) |
|
270 | ->method('getSystemValue') |
|
271 | ->with('trusted_proxies', []) |
|
272 | ->willReturn(['1.2.3.4']); |
|
273 | $this->request->expects($this->once()) |
|
274 | ->method('getRemoteAddress') |
|
275 | ->willReturn('4.3.2.1'); |
|
276 | ||
277 | $this->assertTrue( |
|
278 | self::invokePrivate( |
|
279 | $this->checkSetupController, |
|
280 | 'forwardedForHeadersWorking' |
|
281 | ) |
|
282 | ); |
|
283 | } |
|
284 | ||
285 | public function testCheck() { |
|
286 | $this->config->expects($this->at(0)) |