File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1515 strategy :
1616 fail-fast : false
1717 matrix :
18- php : [ 7.3, 7.4 ]
18+ php : [ 7.3, 7.4, 8.0 ]
1919 laravel : [ '^6.10', '^7.0', '^8.0' ]
2020 dependency-version : [prefer-lowest, prefer-stable]
2121
Original file line number Diff line number Diff line change 1414 }
1515 ],
1616 "require" : {
17- "php" : " ^7.3" ,
17+ "php" : " ^7.3 || ^8.0 " ,
1818 "illuminate/support" : " ^6.10 || ^7.0 || ^8.0" ,
1919 "illuminate/http" : " ^6.10 || ^7.0 || ^8.0"
2020 },
Original file line number Diff line number Diff line change 11<?php
22
3- namespace CodingSocks \UploadHandler \Response ;
3+ namespace CodingSocks \UploadHandler \Tests \ Response ;
44
5+ use CodingSocks \UploadHandler \Response \PercentageJsonResponse ;
56use Illuminate \Foundation \Testing \Concerns \MakesHttpRequests ;
6- use Illuminate \Http \ Response ;
7+ use Illuminate \Testing \ TestResponse ;
78use PHPUnit \Framework \TestCase ;
9+ use Symfony \Component \HttpFoundation \Response ;
810
911class PercentageJsonResponseTest extends TestCase
1012{
@@ -28,7 +30,11 @@ public function percentageProvider()
2830 */
2931 public function testContent (int $ percentage , array $ expectedContent )
3032 {
31- $ response = $ this ->createTestResponse (new PercentageJsonResponse ($ percentage ));
33+ if (class_exists ('\Illuminate\Testing\TestResponse ' )) {
34+ $ response = TestResponse::fromBaseResponse (new PercentageJsonResponse ($ percentage ));
35+ } else {
36+ $ response = $ this ->createTestResponse (new PercentageJsonResponse ($ percentage ));
37+ }
3238
3339 $ response ->assertSuccessful ();
3440 $ response ->assertStatus (Response::HTTP_OK );
You can’t perform that action at this time.
0 commit comments