MediaWiki REL1_34
PageImages\Tests\ApiQueryPageImagesTest Class Reference

@covers ApiQueryPageImages More...

Inheritance diagram for PageImages\Tests\ApiQueryPageImagesTest:
Collaboration diagram for PageImages\Tests\ApiQueryPageImagesTest:

Public Member Functions

 provideExecute ()
 
 provideGetPropName ()
 
 provideGetTitles ()
 
 testConstructor ()
 
 testExecute ( $requestParams, $titles, $queryPageIds, $queryResults, $setResultValueCount)
 @dataProvider provideExecute
 
 testGetAllowedParams ()
 
 testGetCacheMode ()
 
 testGetPropName ( $license, $expected)
 @dataProvider provideGetPropName
 
 testGetTitles ( $titles, $missingTitlesByNamespace, $expected)
 @dataProvider provideGetTitles
 

Private Member Functions

 allResultsHaveProperty ( $queryResults, $propName)
 
 hasExpectedProperties ( $queryResults, $originalRequested)
 
 newInstance ()
 
 noResultsHaveProperty ( $queryResults, $propName)
 

Detailed Description

@covers ApiQueryPageImages

@group PageImages

Note
WTFPL
Author
Sam Smith
Thiemo Kreuz

Definition at line 22 of file ApiQueryPageImagesTest.php.

Member Function Documentation

◆ allResultsHaveProperty()

PageImages\Tests\ApiQueryPageImagesTest::allResultsHaveProperty ( $queryResults,
$propName )
private

◆ hasExpectedProperties()

PageImages\Tests\ApiQueryPageImagesTest::hasExpectedProperties ( $queryResults,
$originalRequested )
private

◆ newInstance()

◆ noResultsHaveProperty()

PageImages\Tests\ApiQueryPageImagesTest::noResultsHaveProperty ( $queryResults,
$propName )
private

◆ provideExecute()

PageImages\Tests\ApiQueryPageImagesTest::provideExecute ( )

Definition at line 186 of file ApiQueryPageImagesTest.php.

◆ provideGetPropName()

PageImages\Tests\ApiQueryPageImagesTest::provideGetPropName ( )

Definition at line 293 of file ApiQueryPageImagesTest.php.

◆ provideGetTitles()

PageImages\Tests\ApiQueryPageImagesTest::provideGetTitles ( )

Definition at line 100 of file ApiQueryPageImagesTest.php.

References NS_FILE, and NS_TALK.

◆ testConstructor()

PageImages\Tests\ApiQueryPageImagesTest::testConstructor ( )

◆ testExecute()

PageImages\Tests\ApiQueryPageImagesTest::testExecute ( $requestParams,
$titles,
$queryPageIds,
$queryResults,
$setResultValueCount )

@dataProvider provideExecute

Parameters
array$requestParamsRequest parameters to the API
array$titlesPage titles passed to the API
array$queryPageIdsPage IDs that will be used for querying the DB.
array$queryResultsResults of the DB select query
int$setResultValueCountThe number results the API returned

Definition at line 139 of file ApiQueryPageImagesTest.php.

References PageImages\Tests\ApiQueryPageImagesTest\hasExpectedProperties().

◆ testGetAllowedParams()

PageImages\Tests\ApiQueryPageImagesTest::testGetAllowedParams ( )

◆ testGetCacheMode()

PageImages\Tests\ApiQueryPageImagesTest::testGetCacheMode ( )

◆ testGetPropName()

PageImages\Tests\ApiQueryPageImagesTest::testGetPropName ( $license,
$expected )

@dataProvider provideGetPropName

Parameters
string$license
string$expected

Definition at line 289 of file ApiQueryPageImagesTest.php.

References PageImages\Tests\ApiQueryPageImagesProxyMock\getPropNames().

◆ testGetTitles()

PageImages\Tests\ApiQueryPageImagesTest::testGetTitles ( $titles,
$missingTitlesByNamespace,
$expected )

@dataProvider provideGetTitles

Definition at line 85 of file ApiQueryPageImagesTest.php.


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