MediaWiki REL1_34
|
@covers \PageImages\Hooks\LinksUpdateHookHandler More...
Public Member Functions | |
provideDoLinksUpdate () | |
provideGetScore () | |
provideIsFreeImage () | |
provideScoreFromTable () | |
setUp () | |
tearDown () | |
testDoLinksUpdate (array $images, $expectedFreeFileName, $expectedNonFreeFileName) | |
@dataProvider provideDoLinksUpdate @covers \PageImages\Hooks\LinksUpdateHookHandler::doLinksUpdate | |
testGetPageImageCandidates () | |
@covers \PageImages\Hooks\LinksUpdateHookHandler::getPageImageCandidates | |
testGetScore ( $image, $scoreFromTable, $position, $expected) | |
@dataProvider provideGetScore | |
testIsFreeImage ( $fileName, $metadata, $expected) | |
@dataProvider provideIsFreeImage @covers \PageImages\Hooks\LinksUpdateHookHandler::isImageFree | |
testScoreFromTable (array $scores, $value, $expected) | |
@dataProvider provideScoreFromTable @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable | |
Private Member Functions | |
getLinksUpdate (array $images, $leadImages=false) | |
getRepoGroup () | |
Required to make wfFindFile in LinksUpdateHookHandler::getScore return something. | |
@covers \PageImages\Hooks\LinksUpdateHookHandler
@group PageImages
Definition at line 22 of file LinksUpdateHookHandlerTest.php.
|
private |
array[] | $images | |
array[] | bool | $leadImages |
Definition at line 44 of file LinksUpdateHookHandlerTest.php.
References $content.
Referenced by PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\testDoLinksUpdate(), and PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\testGetPageImageCandidates().
|
private |
Required to make wfFindFile in LinksUpdateHookHandler::getScore return something.
Definition at line 97 of file LinksUpdateHookHandlerTest.php.
References $file.
Referenced by PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\testIsFreeImage().
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideDoLinksUpdate | ( | ) |
Definition at line 164 of file LinksUpdateHookHandlerTest.php.
References true.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideGetScore | ( | ) |
Definition at line 249 of file LinksUpdateHookHandlerTest.php.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideIsFreeImage | ( | ) |
Definition at line 362 of file LinksUpdateHookHandlerTest.php.
References true.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::provideScoreFromTable | ( | ) |
Definition at line 300 of file LinksUpdateHookHandlerTest.php.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::setUp | ( | ) |
Definition at line 30 of file LinksUpdateHookHandlerTest.php.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::tearDown | ( | ) |
Definition at line 24 of file LinksUpdateHookHandlerTest.php.
References RepoGroup\destroySingleton().
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testDoLinksUpdate | ( | array | $images, |
$expectedFreeFileName, | |||
$expectedNonFreeFileName ) |
@dataProvider provideDoLinksUpdate @covers \PageImages\Hooks\LinksUpdateHookHandler::doLinksUpdate
Definition at line 120 of file LinksUpdateHookHandlerTest.php.
References PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\getLinksUpdate().
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testGetPageImageCandidates | ( | ) |
@covers \PageImages\Hooks\LinksUpdateHookHandler::getPageImageCandidates
Definition at line 208 of file LinksUpdateHookHandlerTest.php.
References PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\getLinksUpdate().
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testGetScore | ( | $image, | |
$scoreFromTable, | |||
$position, | |||
$expected ) |
@dataProvider provideGetScore
Definition at line 229 of file LinksUpdateHookHandlerTest.php.
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testIsFreeImage | ( | $fileName, | |
$metadata, | |||
$expected ) |
@dataProvider provideIsFreeImage @covers \PageImages\Hooks\LinksUpdateHookHandler::isImageFree
Definition at line 349 of file LinksUpdateHookHandlerTest.php.
References PageImages\Tests\Hooks\LinksUpdateHookHandlerTest\getRepoGroup(), and RepoGroup\setSingleton().
PageImages\Tests\Hooks\LinksUpdateHookHandlerTest::testScoreFromTable | ( | array | $scores, |
$value, | |||
$expected ) |
@dataProvider provideScoreFromTable @covers \PageImages\Hooks\LinksUpdateHookHandler::scoreFromTable
Definition at line 293 of file LinksUpdateHookHandlerTest.php.