mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-23 10:21:40 +00:00
VectorComponentTableOfContentsTest: Add mocks for Message:: escaped() and rawParams()
Needed for new security patch.
Change-Id: I9295a8e0f9f00b62d5206f6d7e40bb657f436510
(cherry picked from commit 507de0f4e2
)
This commit is contained in:
parent
4eca3c3198
commit
c999dff13a
|
@ -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;
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue