From 063d765e9445331c41d18ccd4fa2df11137461c3 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 29 May 2018 17:26:18 +1200 Subject: [PATCH] Add test assertion for response instance This prevents middlewares that return null (like the example delegate in this test) from killing a testsuite --- tests/php/Control/DirectorTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/php/Control/DirectorTest.php b/tests/php/Control/DirectorTest.php index 0070f2a50..ac45e6351 100644 --- a/tests/php/Control/DirectorTest.php +++ b/tests/php/Control/DirectorTest.php @@ -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()); }