[WebProfilerBundle] reflect latest changes in test
In #15973, the `searchResultsAction()` of the `ProfilerController` was updated to pass the current request to the rendered template. However, this change was not reflected in the test thus letting it fail.
This commit is contained in:
parent
8b8e7bb281
commit
ae283e80d1
@ -110,6 +110,13 @@ class ProfilerControllerTest extends \PHPUnit_Framework_TestCase
|
|||||||
->method('find')
|
->method('find')
|
||||||
->will($this->returnValue($tokens));
|
->will($this->returnValue($tokens));
|
||||||
|
|
||||||
|
$request = Request::create('/_profiler/empty/search/results', 'GET', array(
|
||||||
|
'limit' => 2,
|
||||||
|
'ip' => '127.0.0.1',
|
||||||
|
'method' => 'GET',
|
||||||
|
'url' => 'http://example.com/',
|
||||||
|
));
|
||||||
|
|
||||||
$twig->expects($this->once())
|
$twig->expects($this->once())
|
||||||
->method('render')
|
->method('render')
|
||||||
->with($this->stringEndsWith('results.html.twig'), $this->equalTo(array(
|
->with($this->stringEndsWith('results.html.twig'), $this->equalTo(array(
|
||||||
@ -123,16 +130,10 @@ class ProfilerControllerTest extends \PHPUnit_Framework_TestCase
|
|||||||
'end' => null,
|
'end' => null,
|
||||||
'limit' => 2,
|
'limit' => 2,
|
||||||
'panel' => null,
|
'panel' => null,
|
||||||
|
'request' => $request,
|
||||||
)));
|
)));
|
||||||
|
|
||||||
$response = $controller->searchResultsAction(
|
$response = $controller->searchResultsAction($request, 'empty');
|
||||||
Request::create(
|
|
||||||
'/_profiler/empty/search/results',
|
|
||||||
'GET',
|
|
||||||
array('limit' => 2, 'ip' => '127.0.0.1', 'method' => 'GET', 'url' => 'http://example.com/')
|
|
||||||
),
|
|
||||||
'empty'
|
|
||||||
);
|
|
||||||
$this->assertEquals(200, $response->getStatusCode());
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user