router = $this->prophesize(RouterInterface::class); $this->renderer = $this->prophesize(TemplateRendererInterface::class); } public function testReturnsHtmlResponse() { $this->renderer ->render('app::home-page', Argument::type('array')) ->willReturn(''); $homePage = new HomePageAction( $this->router->reveal(), $this->renderer->reveal(), $this->prophesize(Config::class)->reveal() ); $response = $homePage->process( $this->prophesize(ServerRequestInterface::class)->reveal(), $this->prophesize(DelegateInterface::class)->reveal() ); $this->assertInstanceOf(HtmlResponse::class, $response); } }