mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
6d98a912c9
commit
063d765e94
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user