From a7d821d48840e1d8afe5bd6febbcc281fdac4a41 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 30 Sep 2024 17:56:24 +0200 Subject: [PATCH] fix: Disable constructor in ErrorPagePluginTest Signed-off-by: Louis Chemineau --- apps/dav/tests/unit/DAV/ErrorPagePluginTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dav/tests/unit/DAV/ErrorPagePluginTest.php b/apps/dav/tests/unit/DAV/ErrorPagePluginTest.php index 0d298f461aeab..87f989220c22c 100644 --- a/apps/dav/tests/unit/DAV/ErrorPagePluginTest.php +++ b/apps/dav/tests/unit/DAV/ErrorPagePluginTest.php @@ -36,7 +36,7 @@ class ErrorPagePluginTest extends \Test\TestCase { */ public function test($expectedCode, $exception) { /** @var ErrorPagePlugin | \PHPUnit\Framework\MockObject\MockObject $plugin */ - $plugin = $this->getMockBuilder(ErrorPagePlugin::class)->setMethods(['sendResponse', 'generateBody'])->getMock(); + $plugin = $this->getMockBuilder(ErrorPagePlugin::class)->disableOriginalConstructor()->setMethods(['sendResponse', 'generateBody'])->getMock(); $plugin->expects($this->once())->method('generateBody')->willReturn(':boom:'); $plugin->expects($this->once())->method('sendResponse'); /** @var \Sabre\DAV\Server | \PHPUnit\Framework\MockObject\MockObject $server */