publicfunctiontestAssertResponseRedirectsWithLocation() { $this->getResponseTester(newResponse('', 301, ['Location' => 'https://example.com/']))->assertResponseRedirects('https://example.com/'); $this->expectException(AssertionFailedError::class); $this->expectExceptionMessage('is redirected and has header "Location" with value "https://example.com/".'); $this->getResponseTester(newResponse('', 301))->assertResponseRedirects('https://example.com/'); }