diff --git a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php index d379aafb1..7dfa284e7 100644 --- a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php +++ b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php @@ -176,6 +176,8 @@ class VectorComponentTableOfContentsTest extends \MediaWikiUnitTestCase { $localizer->method( 'msg' )->willReturnCallback( function ( $key, ...$params ) { $msg = $this->createMock( Message::class ); $msg->method( '__toString' )->willReturn( $key ); + $msg->method( 'escaped' )->willReturn( $key ); + $msg->method( 'rawParams' )->will( $this->returnSelf() ); $msg->method( 'text' )->willReturn( $key ); return $msg; } );