public function testRedirectInternal() { $url = 'http://url/match?param=value'; $urlHelperMock = $this->getMock(\Magelight\Helpers\UrlHelper::class, [], [], '', false); $urlHelperMock->expects($this->once())->method('getUrl')->with('match', ['param' => 'value'], 'http')->will($this->returnValue('http://url/match?param=value')); \Magelight\Helpers\UrlHelper::forgeMock($urlHelperMock); $this->serverMock->expects($this->once())->method('sendHeader')->with("Location: " . $url); $this->appMock->expects($this->once())->method('shutdown'); $this->controller->redirectInternal('match', ['param' => 'value']); }