summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php')
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
index e2e72df00c..15e543a214 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
@@ -23,7 +23,7 @@ class FragmentHandlerTest extends TestCase
{
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->requestStack = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack')
->disableOriginalConstructor()
@@ -36,31 +36,25 @@ class FragmentHandlerTest extends TestCase
;
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testRenderWhenRendererDoesNotExist()
{
+ $this->expectException('InvalidArgumentException');
$handler = new FragmentHandler($this->requestStack);
$handler->render('/', 'foo');
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testRenderWithUnknownRenderer()
{
+ $this->expectException('InvalidArgumentException');
$handler = $this->getHandler($this->returnValue(new Response('foo')));
$handler->render('/', 'bar');
}
- /**
- * @expectedException \RuntimeException
- * @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404).
- */
public function testDeliverWithUnsuccessfulResponse()
{
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('Error when rendering "http://localhost/" (Status code is 404).');
$handler = $this->getHandler($this->returnValue(new Response('foo', 404)));
$handler->render('/', 'foo');