X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FFileContentHandlerTest.php;h=9149fc4f57fafd734c395ce918376306887d8e29;hb=214b37ff07f3fde89430297b2a857750a56ae205;hp=65efcc9e804b7f5ee9f17fdabb938efacd774ed8;hpb=fa32e55a7c7c133fd841f474237c6a11a1ff0588;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/content/FileContentHandlerTest.php b/tests/phpunit/includes/content/FileContentHandlerTest.php index 65efcc9e80..9149fc4f57 100644 --- a/tests/phpunit/includes/content/FileContentHandlerTest.php +++ b/tests/phpunit/includes/content/FileContentHandlerTest.php @@ -2,6 +2,8 @@ /** * @group ContentHandler + * + * @covers FileContentHandler */ class FileContentHandlerTest extends MediaWikiLangTestCase { /** @@ -16,13 +18,13 @@ class FileContentHandlerTest extends MediaWikiLangTestCase { } public function testIndexMapping() { - $mockEngine = $this->createMock( 'SearchEngine' ); + $mockEngine = $this->createMock( SearchEngine::class ); $mockEngine->expects( $this->atLeastOnce() ) ->method( 'makeSearchFieldMapping' ) ->willReturnCallback( function ( $name, $type ) { $mockField = - $this->getMockBuilder( 'SearchIndexFieldDefinition' ) + $this->getMockBuilder( SearchIndexFieldDefinition::class ) ->setMethods( [ 'getMapping' ] ) ->setConstructorArgs( [ $name, $type ] ) ->getMock(); @@ -41,7 +43,7 @@ class FileContentHandlerTest extends MediaWikiLangTestCase { 'file_text' => 1, ]; foreach ( $map as $name => $field ) { - $this->assertInstanceOf( 'SearchIndexField', $field ); + $this->assertInstanceOf( SearchIndexField::class, $field ); $this->assertEquals( $name, $field->getName() ); unset( $expect[$name] ); }