[HttpKernel] fix test compat with PHP 5.3
This commit is contained in:
parent
00b6f53a55
commit
749410a224
@ -1440,11 +1440,12 @@ class HttpCacheTest extends HttpCacheTestCase
|
|||||||
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
|
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
|
||||||
$store = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\StoreInterface')->getMock();
|
$store = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpCache\StoreInterface')->getMock();
|
||||||
|
|
||||||
|
$that = $this;
|
||||||
$kernel
|
$kernel
|
||||||
->expects($this->exactly(2))
|
->expects($this->exactly(2))
|
||||||
->method('handle')
|
->method('handle')
|
||||||
->willReturnCallback(function (Request $request) {
|
->willReturnCallback(function (Request $request) use ($that) {
|
||||||
$this->assertSame('127.0.0.1', $request->server->get('REMOTE_ADDR'));
|
$that->assertSame('127.0.0.1', $request->server->get('REMOTE_ADDR'));
|
||||||
|
|
||||||
return new Response();
|
return new Response();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user