[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:
Christian Flothmann 2015-09-28 20:15:56 +02:00
parent 8b8e7bb281
commit ae283e80d1

View File

@ -110,6 +110,13 @@ class ProfilerControllerTest extends \PHPUnit_Framework_TestCase
->method('find')
->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())
->method('render')
->with($this->stringEndsWith('results.html.twig'), $this->equalTo(array(
@ -123,16 +130,10 @@ class ProfilerControllerTest extends \PHPUnit_Framework_TestCase
'end' => null,
'limit' => 2,
'panel' => null,
'request' => $request,
)));
$response = $controller->searchResultsAction(
Request::create(
'/_profiler/empty/search/results',
'GET',
array('limit' => 2, 'ip' => '127.0.0.1', 'method' => 'GET', 'url' => 'http://example.com/')
),
'empty'
);
$response = $controller->searchResultsAction($request, 'empty');
$this->assertEquals(200, $response->getStatusCode());
}
}