minor #15981 [WebProfilerBundle] reflect latest changes in test (xabbuh)
This PR was merged into the 2.8 branch.
Discussion
----------
[WebProfilerBundle] reflect latest changes in test
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
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.
Commits
-------
ae283e8
[WebProfilerBundle] reflect latest changes in test
This commit is contained in:
commit
0d71b1e9ee
@ -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