diff --git a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php index bd15f5458..5a5462305 100644 --- a/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php +++ b/tests/phpunit/unit/components/VectorComponentTableOfContentsTest.php @@ -186,6 +186,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; } );