public function throwStatusSetsTheStatusMessageAsContentIfNoFurtherContentIsProvided() { $controller = $this->getAccessibleMock(AbstractController::class, ['processRequest']); $controller->_call('initializeController', $this->mockActionRequest, $this->mockHttpResponse); $this->mockHttpResponse->expects($this->atLeastOnce())->method('setStatus')->with(404, null); $this->mockHttpResponse->expects($this->atLeastOnce())->method('getStatus')->will($this->returnValue('404 Not Found')); $this->mockHttpResponse->expects($this->atLeastOnce())->method('setContent')->with('404 Not Found'); try { $controller->_call('throwStatus', 404); } catch (StopActionException $e) { } }