diff --git a/spec/Listener/ForceHttpsSpec.php b/spec/Listener/ForceHttpsSpec.php index e6cc1b0..428a93f 100644 --- a/spec/Listener/ForceHttpsSpec.php +++ b/spec/Listener/ForceHttpsSpec.php @@ -125,6 +125,7 @@ allow($mvcEvent)->toReceive('getResponse')->andReturn($response); allow($response)->toReceive('setStatusCode')->with(302)->andReturn($response); allow($response)->toReceive('getHeaders', 'addHeaderLine')->with('Location', 'https://example.com/about'); + allow($response)->toReceive('send'); expect($mvcEvent)->toReceive('getResponse'); diff --git a/src/Listener/ForceHttps.php b/src/Listener/ForceHttps.php index dc234ac..ddd3b19 100644 --- a/src/Listener/ForceHttps.php +++ b/src/Listener/ForceHttps.php @@ -64,5 +64,6 @@ public function forceHttpsScheme(MvcEvent $e) $response->setStatusCode(302); $response->getHeaders() ->addHeaderLine('Location', $httpsRequestUri); + $response->send(); } }