Skip to content

Commit 5e2c20e

Browse files
kayw-geekcrynobone
andcommitted
Update src/Illuminate/Testing/TestResponse.php
Co-authored-by: Mior Muhammad Zaki <crynobone@gmail.com>
1 parent 1010a2d commit 5e2c20e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Illuminate/Testing/TestResponse.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
1111
use Illuminate\Database\Eloquent\Model;
1212
use Illuminate\Http\Request;
13+
use Illuminate\Http\Response;
1314
use Illuminate\Support\Arr;
1415
use Illuminate\Support\Carbon;
1516
use Illuminate\Support\Collection;
@@ -1739,6 +1740,8 @@ public function __call($method, $args)
17391740
return $this->macroCall($method, $args);
17401741
}
17411742

1743+
throw_if(!$this->baseResponse instanceof Response);
1744+
17421745
return $this->baseResponse->{$method}(...$args);
17431746
}
17441747
}

0 commit comments

Comments
 (0)