1111use Illuminate \Http \UploadedFile ;
1212use Illuminate \Support \Facades \Event ;
1313use Illuminate \Support \Facades \Storage ;
14+ use Illuminate \Testing \TestResponse ;
1415use Illuminate \Validation \ValidationException ;
1516use Symfony \Component \HttpKernel \Exception \BadRequestHttpException ;
1617use Symfony \Component \HttpKernel \Exception \MethodNotAllowedHttpException ;
@@ -65,7 +66,7 @@ public function testMethodNotAllowed($requestMethod)
6566
6667 $ this ->expectException (MethodNotAllowedHttpException::class);
6768
68- $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
69+ TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
6970 }
7071
7172 public function testResumeWhenChunkDoesNotExists ()
@@ -75,7 +76,7 @@ public function testResumeWhenChunkDoesNotExists()
7576 'totalSize ' => '200 ' ,
7677 ]);
7778
78- $ response = $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
79+ $ response = TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
7980 $ response ->assertSuccessful ();
8081 $ response ->assertJson (['size ' => 0 ]);
8182 }
@@ -89,7 +90,7 @@ public function testResume()
8990 'totalSize ' => '200 ' ,
9091 ]);
9192
92- $ response = $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
93+ $ response = TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
9394 $ response ->assertSuccessful ();
9495 $ response ->assertJson (['size ' => 100 ]);
9596 }
@@ -123,7 +124,7 @@ public function testUploadMonolith()
123124 'file ' => $ file ,
124125 ]);
125126
126- $ response = $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
127+ $ response = TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
127128 $ response ->assertSuccessful ();
128129 $ response ->assertJson (['done ' => 100 ]);
129130
@@ -200,7 +201,7 @@ public function testUploadFirstChunk()
200201 'file ' => $ file ,
201202 ]);
202203
203- $ response = $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
204+ $ response = TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
204205 $ response ->assertSuccessful ();
205206 $ response ->assertJson (['done ' => 50 ]);
206207
@@ -246,7 +247,7 @@ public function testUploadLastChunk()
246247 'file ' => $ file ,
247248 ]);
248249
249- $ response = $ this -> createTestResponse ($ this ->handler ->handle ($ request ));
250+ $ response = TestResponse:: fromBaseResponse ($ this ->handler ->handle ($ request ));
250251 $ response ->assertSuccessful ();
251252 $ response ->assertJson (['done ' => 100 ]);
252253
0 commit comments