@@ -97,7 +97,7 @@ public function testCreate()
9797 {
9898 $ response = JsonResponse::create (['foo ' => 'bar ' ], 204 );
9999
100- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
100+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
101101 $ this ->assertEquals ('{"foo":"bar"} ' , $ response ->getContent ());
102102 $ this ->assertEquals (204 , $ response ->getStatusCode ());
103103 }
@@ -108,7 +108,7 @@ public function testCreate()
108108 public function testStaticCreateEmptyJsonObject ()
109109 {
110110 $ response = JsonResponse::create ();
111- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
111+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
112112 $ this ->assertSame ('{} ' , $ response ->getContent ());
113113 }
114114
@@ -118,7 +118,7 @@ public function testStaticCreateEmptyJsonObject()
118118 public function testStaticCreateJsonArray ()
119119 {
120120 $ response = JsonResponse::create ([0 , 1 , 2 , 3 ]);
121- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
121+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
122122 $ this ->assertSame ('[0,1,2,3] ' , $ response ->getContent ());
123123 }
124124
@@ -128,7 +128,7 @@ public function testStaticCreateJsonArray()
128128 public function testStaticCreateJsonObject ()
129129 {
130130 $ response = JsonResponse::create (['foo ' => 'bar ' ]);
131- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
131+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
132132 $ this ->assertSame ('{"foo":"bar"} ' , $ response ->getContent ());
133133 }
134134
@@ -138,20 +138,20 @@ public function testStaticCreateJsonObject()
138138 public function testStaticCreateWithSimpleTypes ()
139139 {
140140 $ response = JsonResponse::create ('foo ' );
141- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
141+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
142142 $ this ->assertSame ('"foo" ' , $ response ->getContent ());
143143
144144 $ response = JsonResponse::create (0 );
145- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
145+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
146146 $ this ->assertSame ('0 ' , $ response ->getContent ());
147147
148148 $ response = JsonResponse::create (0.1 );
149- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
149+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
150150 $ this ->assertEquals (0.1 , $ response ->getContent ());
151151 $ this ->assertIsString ($ response ->getContent ());
152152
153153 $ response = JsonResponse::create (true );
154- $ this ->assertInstanceOf (' Symfony\Component\HttpFoundation\ JsonResponse' , $ response );
154+ $ this ->assertInstanceOf (JsonResponse::class , $ response );
155155 $ this ->assertSame ('true ' , $ response ->getContent ());
156156 }
157157
@@ -236,22 +236,22 @@ public function testItAcceptsJsonAsString()
236236
237237 public function testSetCallbackInvalidIdentifier ()
238238 {
239- $ this ->expectException (' InvalidArgumentException ' );
239+ $ this ->expectException (\ InvalidArgumentException::class );
240240 $ response = new JsonResponse ('foo ' );
241241 $ response ->setCallback ('+invalid ' );
242242 }
243243
244244 public function testSetContent ()
245245 {
246- $ this ->expectException (' InvalidArgumentException ' );
246+ $ this ->expectException (\ InvalidArgumentException::class );
247247 new JsonResponse ("\xB1\x31" );
248248 }
249249
250250 public function testSetContentJsonSerializeError ()
251251 {
252- $ this ->expectException (' Exception ' );
252+ $ this ->expectException (\ Exception::class );
253253 $ this ->expectExceptionMessage ('This error is expected ' );
254- if (!interface_exists (' JsonSerializable ' , false )) {
254+ if (!interface_exists (\ JsonSerializable::class , false )) {
255255 $ this ->markTestSkipped ('JsonSerializable is required. ' );
256256 }
257257
@@ -299,7 +299,7 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException(
299299 }
300300}
301301
302- if (interface_exists (' JsonSerializable ' , false )) {
302+ if (interface_exists (\ JsonSerializable::class , false )) {
303303 class JsonSerializableObject implements \JsonSerializable
304304 {
305305 public function jsonSerialize ()
0 commit comments