@@ -26,7 +26,7 @@ class FragmentHandlerTest extends TestCase
26
26
27
27
protected function setUp (): void
28
28
{
29
- $ this ->requestStack = $ this ->getMockBuilder (' Symfony \\ Component \\ HttpFoundation \\ RequestStack ' )
29
+ $ this ->requestStack = $ this ->getMockBuilder (\ Symfony \Component \HttpFoundation \RequestStack::class )
30
30
->disableOriginalConstructor ()
31
31
->getMock ()
32
32
;
@@ -39,14 +39,14 @@ protected function setUp(): void
39
39
40
40
public function testRenderWhenRendererDoesNotExist ()
41
41
{
42
- $ this ->expectException (' InvalidArgumentException ' );
42
+ $ this ->expectException (\ InvalidArgumentException::class );
43
43
$ handler = new FragmentHandler ($ this ->requestStack );
44
44
$ handler ->render ('/ ' , 'foo ' );
45
45
}
46
46
47
47
public function testRenderWithUnknownRenderer ()
48
48
{
49
- $ this ->expectException (' InvalidArgumentException ' );
49
+ $ this ->expectException (\ InvalidArgumentException::class );
50
50
$ handler = $ this ->getHandler ($ this ->returnValue (new Response ('foo ' )));
51
51
52
52
$ handler ->render ('/ ' , 'bar ' );
@@ -59,7 +59,7 @@ public function testDeliverWithUnsuccessfulResponse()
59
59
$ handler ->render ('/ ' , 'foo ' );
60
60
$ this ->fail ('->render() throws a \RuntimeException exception if response is not successful ' );
61
61
} catch (\Exception $ e ) {
62
- $ this ->assertInstanceOf (' \RuntimeException ' , $ e );
62
+ $ this ->assertInstanceOf (\RuntimeException::class , $ e );
63
63
$ this ->assertEquals (0 , $ e ->getCode ());
64
64
$ this ->assertEquals ('Error when rendering "http://localhost/" (Status code is 404). ' , $ e ->getMessage ());
65
65
@@ -79,7 +79,7 @@ public function testRender()
79
79
80
80
protected function getHandler ($ returnValue , $ arguments = [])
81
81
{
82
- $ renderer = $ this ->getMockBuilder (' Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface ' )->getMock ();
82
+ $ renderer = $ this ->getMockBuilder (\ Symfony \Component \HttpKernel \Fragment \FragmentRendererInterface::class )->getMock ();
83
83
$ renderer
84
84
->expects ($ this ->any ())
85
85
->method ('getName ' )
0 commit comments