X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FContentHandlerTest.php;h=ee79ffa40f09ee5c687cc01ab419209f36f368d8;hb=00cc6ec3ba3de2bfb2873651ddaf06d29addfd55;hp=ae662532d8d14ddd61c7d191db7d49855358f7e5;hpb=4b77a6463a7eecd9d53de10558a1dfc663dca87f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php index ae662532d8..ee79ffa40f 100644 --- a/tests/phpunit/includes/content/ContentHandlerTest.php +++ b/tests/phpunit/includes/content/ContentHandlerTest.php @@ -28,7 +28,7 @@ class ContentHandlerTest extends MediaWikiTestCase { CONTENT_MODEL_CSS => 'CssContentHandler', CONTENT_MODEL_TEXT => 'TextContentHandler', 'testing' => 'DummyContentHandlerForTesting', - 'testing-callbacks' => function( $modelId ) { + 'testing-callbacks' => function ( $modelId ) { return new DummyContentHandlerForTesting( $modelId ); } ], @@ -418,7 +418,7 @@ class ContentHandlerTest extends MediaWikiTestCase { $searchEngine->expects( $this->any() ) ->method( 'makeSearchFieldMapping' ) - ->will( $this->returnCallback( function( $name, $type ) { + ->will( $this->returnCallback( function ( $name, $type ) { return new DummySearchIndexFieldDefinition( $name, $type ); } ) ); @@ -429,13 +429,18 @@ class ContentHandlerTest extends MediaWikiTestCase { * @covers ContentHandler::getDataForSearchIndex */ public function testDataIndexFields() { - $mockEngine = $this->getMock( 'SearchEngine' ); + $mockEngine = $this->createMock( 'SearchEngine' ); $title = Title::newFromText( 'Not_Main_Page', NS_MAIN ); $page = new WikiPage( $title ); $this->setTemporaryHook( 'SearchDataForIndex', - function ( &$fields, ContentHandler $handler, WikiPage $page, ParserOutput $output, - SearchEngine $engine ) { + function ( + &$fields, + ContentHandler $handler, + WikiPage $page, + ParserOutput $output, + SearchEngine $engine + ) { $fields['testDataField'] = 'test content'; } );