[HttpKernel] added a missing unit test
This commit is contained in:
parent
c0d72d275f
commit
6a53180aa9
@ -33,11 +33,22 @@ class HttpContentRendererTest extends \PHPUnit_Framework_TestCase
|
||||
$renderer->render('/', 'foo');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException InvalidArgumentException
|
||||
*/
|
||||
public function testRenderWithUnknownStrategy()
|
||||
{
|
||||
$strategy = $this->getStrategy($this->returnValue(new Response('foo')));
|
||||
$renderer = $this->getRenderer($strategy);
|
||||
|
||||
$renderer->render('/', 'bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException RuntimeException
|
||||
* @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404).
|
||||
*/
|
||||
public function testDeliverWithUnSuccessfulResponse()
|
||||
public function testDeliverWithUnsuccessfulResponse()
|
||||
{
|
||||
$strategy = $this->getStrategy($this->returnValue(new Response('foo', 404)));
|
||||
$renderer = $this->getRenderer($strategy);
|
||||
|
Reference in New Issue
Block a user