From 365f4b28996b5a2ca4072f8096bc2e7a0c7791d7 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 30 Jul 2018 08:29:53 +0200 Subject: Fix HtmlResponse type incompatibility in tests Signed-off-by: Christoph Wurst --- tests/Controller/MessagesControllerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Controller/MessagesControllerTest.php b/tests/Controller/MessagesControllerTest.php index 0c6ed89f4..2eaa06e35 100644 --- a/tests/Controller/MessagesControllerTest.php +++ b/tests/Controller/MessagesControllerTest.php @@ -121,7 +121,7 @@ class MessagesControllerTest extends TestCase { ->will($this->returnValue($this->message)); $this->timeFactory->method('getTime')->willReturn(1000); - $expectedResponse = new HtmlResponse(null); + $expectedResponse = new HtmlResponse(''); $expectedResponse->setCacheHeaders(3600, $this->timeFactory); $expectedResponse->addHeader('Pragma', 'cache'); if (class_exists('\OCP\AppFramework\Http\ContentSecurityPolicy')) { -- cgit v1.2.3 From 26242e95213ce72ae9dcac75d706b70d8c9570bb Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 30 Jul 2018 08:49:09 +0200 Subject: Fix HTML body in mocked message Signed-off-by: Christoph Wurst --- tests/Controller/MessagesControllerTest.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/Controller/MessagesControllerTest.php b/tests/Controller/MessagesControllerTest.php index 2eaa06e35..36eac5779 100644 --- a/tests/Controller/MessagesControllerTest.php +++ b/tests/Controller/MessagesControllerTest.php @@ -119,6 +119,9 @@ class MessagesControllerTest extends TestCase { ->method('getMessage') ->with($this->equalTo($messageId)) ->will($this->returnValue($this->message)); + $this->message->expects($this->once()) + ->method('getHtmlBody') + ->willReturn(''); $this->timeFactory->method('getTime')->willReturn(1000); $expectedResponse = new HtmlResponse(''); -- cgit v1.2.3