Add test assertion for response instance

This prevents middlewares that return null (like the example delegate in this test) from killing a testsuite
This commit is contained in:
Robbie Averill 2018-05-29 17:26:18 +12:00
parent 6d98a912c9
commit 063d765e94

View File

@ -593,6 +593,7 @@ class DirectorTest extends SapphireTest
}, 'http://www.mysite.com:9090/some-url');
// Middleware returns non-exception redirect
$this->assertInstanceOf(HTTPResponse::class, $response);
$this->assertEquals('https://www.mysite.com:9090/some-url', $response->getHeader('Location'));
$this->assertEquals(301, $response->getStatusCode());
}