Skip to content

Commit

Permalink
fix: Disable constructor in ErrorPagePluginTest
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge committed Sep 30, 2024
1 parent 02f447b commit a7d821d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/DAV/ErrorPagePluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a7d821d

Please sign in to comment.