X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fcontent%2FTextContentHandlerTest.php;h=6d0a3d5ce8f6666a01b15ca1ba705262d399b2a2;hb=45da5815517c408bafed6b3744766860afdcd7b8;hp=918815ca05e831ff050a56f37b70e3d662f8ba9c;hpb=0687f250d6fb4196a7aa60af4fe11c7d21f3c455;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/content/TextContentHandlerTest.php b/tests/phpunit/includes/content/TextContentHandlerTest.php index 918815ca05..6d0a3d5ce8 100644 --- a/tests/phpunit/includes/content/TextContentHandlerTest.php +++ b/tests/phpunit/includes/content/TextContentHandlerTest.php @@ -4,6 +4,9 @@ * @group ContentHandler */ class TextContentHandlerTest extends MediaWikiLangTestCase { + /** + * @covers TextContentHandler::supportsDirectEditing + */ public function testSupportsDirectEditing() { $handler = new TextContentHandler(); $this->assertTrue( $handler->supportsDirectEditing(), 'direct editing is supported' ); @@ -16,13 +19,13 @@ class TextContentHandlerTest extends MediaWikiLangTestCase { public function testFieldsForIndex() { $handler = new TextContentHandler(); - $mockEngine = $this->getMock( 'SearchEngine' ); + $mockEngine = $this->createMock( SearchEngine::class ); $mockEngine->expects( $this->atLeastOnce() ) ->method( 'makeSearchFieldMapping' ) ->willReturnCallback( function ( $name, $type ) { $mockField = - $this->getMockBuilder( 'SearchIndexFieldDefinition' ) + $this->getMockBuilder( SearchIndexFieldDefinition::class ) ->setConstructorArgs( [ $name, $type ] ) ->getMock(); $mockField->expects( $this->atLeastOnce() )->method( 'getMapping' )->willReturn( [ @@ -39,7 +42,7 @@ class TextContentHandlerTest extends MediaWikiLangTestCase { $fields = $handler->getFieldsForSearchIndex( $mockEngine ); $mappedFields = []; foreach ( $fields as $name => $field ) { - $this->assertInstanceOf( 'SearchIndexField', $field ); + $this->assertInstanceOf( SearchIndexField::class, $field ); /** * @var $field SearchIndexField */