Skip to content

Commit

Permalink
Update src/Illuminate/Testing/TestResponse.php
Browse files Browse the repository at this point in the history
Co-authored-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
kayw-geek and crynobone committed Sep 25, 2024
1 parent 1010a2d commit 5e2c20e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Illuminate/Testing/TestResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
Expand Down Expand Up @@ -1739,6 +1740,8 @@ public function __call($method, $args)
return $this->macroCall($method, $args);
}

throw_if(!$this->baseResponse instanceof Response);

return $this->baseResponse->{$method}(...$args);
}
}

0 comments on commit 5e2c20e

Please sign in to comment.