diff --git a/src/Illuminate/Testing/TestResponse.php b/src/Illuminate/Testing/TestResponse.php index d1958590914b..fca9f1b71cb1 100644 --- a/src/Illuminate/Testing/TestResponse.php +++ b/src/Illuminate/Testing/TestResponse.php @@ -46,7 +46,7 @@ class TestResponse implements ArrayAccess /** * The response to delegate to. * - * @var \Illuminate\Http\Response + * @var \Symfony\Component\HttpFoundation\Response */ public $baseResponse; @@ -67,7 +67,7 @@ class TestResponse implements ArrayAccess /** * Create a new test response instance. * - * @param \Illuminate\Http\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @param \Illuminate\Http\Request|null $request * @return void */ @@ -81,7 +81,7 @@ public function __construct($response, $request = null) /** * Create a new TestResponse from another response. * - * @param \Illuminate\Http\Response $response + * @param \Symfony\Component\HttpFoundation\Response $response * @param \Illuminate\Http\Request|null $request * @return static */ diff --git a/types/Testing/TestResponse.php b/types/Testing/TestResponse.php new file mode 100644 index 000000000000..a43bc0d1ced1 --- /dev/null +++ b/types/Testing/TestResponse.php @@ -0,0 +1,20 @@ +baseResponse); + +$response = TestResponse::fromBaseResponse(new RedirectResponse('')); +assertType(Response::class, $response->baseResponse); + +$response = TestResponse::fromBaseResponse(response()->redirectTo('')); +assertType(Response::class, $response->baseResponse); + +$response = TestResponse::fromBaseResponse(response()->download('')); +assertType(Response::class, $response->baseResponse);