MediaWiki  1.34.0
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest Class Reference

@covers \PageImages\Hooks\LinksUpdateHookHandler More...

Inheritance diagram for PageImages\Tests\Hooks\LinksUpdateHookHandlerTest:
Collaboration diagram for PageImages\Tests\Hooks\LinksUpdateHookHandlerTest:

Public Member Functions

 provideDoLinksUpdate ()
 
 provideGetScore ()
 
 provideIsFreeImage ()
 
 provideScoreFromTable ()
 
 setUp ()
 
 tearDown ()
 
 testDoLinksUpdate (array $images, $expectedFreeFileName, $expectedNonFreeFileName)
 @dataProvider provideDoLinksUpdate @covers \PageImages\Hooks\LinksUpdateHookHandler::doLinksUpdate More...
 
 testGetPageImageCandidates ()
 @covers \PageImages\Hooks\LinksUpdateHookHandler::getPageImageCandidates More...
 
 testGetScore ( $image, $scoreFromTable, $position, $expected)
 @dataProvider provideGetScore More...
 
 testIsFreeImage ( $fileName, $metadata, $expected)
 @dataProvider provideIsFreeImage @covers \PageImages\Hooks\LinksUpdateHookHandler::isImageFree More...
 
 testScoreFromTable (array $scores, $value, $expected)
 @dataProvider provideScoreFromTable @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable More...
 

Private Member Functions

 getLinksUpdate (array $images, $leadImages=false)
 
 getRepoGroup ()
 Required to make wfFindFile in LinksUpdateHookHandler::getScore return something. More...
 

Detailed Description

@covers \PageImages\Hooks\LinksUpdateHookHandler

@group PageImages

Note
WTFPL
Author
Thiemo Kreuz

Definition at line 22 of file LinksUpdateHookHandlerTest.php.

Member Function Documentation

◆ getLinksUpdate()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::getLinksUpdate ( array  $images,
  $leadImages = false 
)
private

◆ getRepoGroup()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::getRepoGroup ( )
private

Required to make wfFindFile in LinksUpdateHookHandler::getScore return something.

Returns
RepoGroup

Definition at line 97 of file LinksUpdateHookHandlerTest.php.

References $file.

Referenced by PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\testIsFreeImage().

◆ provideDoLinksUpdate()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideDoLinksUpdate ( )

Definition at line 164 of file LinksUpdateHookHandlerTest.php.

References true.

◆ provideGetScore()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideGetScore ( )

Definition at line 249 of file LinksUpdateHookHandlerTest.php.

◆ provideIsFreeImage()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideIsFreeImage ( )

Definition at line 362 of file LinksUpdateHookHandlerTest.php.

References true.

◆ provideScoreFromTable()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideScoreFromTable ( )

Definition at line 300 of file LinksUpdateHookHandlerTest.php.

◆ setUp()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::setUp ( )

Definition at line 30 of file LinksUpdateHookHandlerTest.php.

◆ tearDown()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::tearDown ( )

Definition at line 24 of file LinksUpdateHookHandlerTest.php.

References RepoGroup\destroySingleton().

◆ testDoLinksUpdate()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testDoLinksUpdate ( array  $images,
  $expectedFreeFileName,
  $expectedNonFreeFileName 
)

◆ testGetPageImageCandidates()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testGetPageImageCandidates ( )

◆ testGetScore()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testGetScore (   $image,
  $scoreFromTable,
  $position,
  $expected 
)

@dataProvider provideGetScore

Definition at line 229 of file LinksUpdateHookHandlerTest.php.

◆ testIsFreeImage()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testIsFreeImage (   $fileName,
  $metadata,
  $expected 
)

◆ testScoreFromTable()

PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testScoreFromTable ( array  $scores,
  $value,
  $expected 
)

@dataProvider provideScoreFromTable @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable

Definition at line 293 of file LinksUpdateHookHandlerTest.php.


The documentation for this class was generated from the following file: