From 6a7c1b249126fbe2495d27b611c8d3b955bcf92d Mon Sep 17 00:00:00 2001 From: Wouter J Date: Thu, 27 Aug 2015 16:15:37 +0200 Subject: [PATCH] Fix randomly failing test --- Tests/Unit/Controller/SitemapControllerTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Tests/Unit/Controller/SitemapControllerTest.php b/Tests/Unit/Controller/SitemapControllerTest.php index 2e8a2ebd..2f6a8348 100644 --- a/Tests/Unit/Controller/SitemapControllerTest.php +++ b/Tests/Unit/Controller/SitemapControllerTest.php @@ -86,13 +86,15 @@ public function testRequestJson() public function testRequestXml() { - $response = new Response('some-xml-string'); - $this->templating->expects($this->once())->method('render')->will($this->returnValue($response)); + $this->templating->expects($this->once()) + ->method('render') + ->with($this->equalTo('CmfSeoBundle:Sitemap:index.xml.twig'), $this->anything()) + ->will($this->returnValue('some-xml-string')); /** @var Response $response */ $response = $this->controller->indexAction('xml', 'test'); - $this->assertEquals(new Response('some-xml-string'), $response->getContent()); + $this->assertEquals('some-xml-string', $response->getContent()); } public function testRequestHtml()