MediaWiki  1.34.0
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 More...
 
 testGetAllowedParams ()
 
 testGetCacheMode ()
 
 testGetPropName ( $license, $expected)
 @dataProvider provideGetPropName More...
 
 testGetTitles ( $titles, $missingTitlesByNamespace, $expected)
 @dataProvider provideGetTitles More...
 

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 ( )

◆ provideGetPropName()

PageImages\Tests\ApiQueryPageImagesTest::provideGetPropName ( )

Definition at line 293 of file ApiQueryPageImagesTest.php.

References PageImages\PROP_NAME, and PageImages\PROP_NAME_FREE.

◆ provideGetTitles()

PageImages\Tests\ApiQueryPageImagesTest::provideGetTitles ( )

Definition at line 100 of file ApiQueryPageImagesTest.php.

References Title\newFromText(), 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\getPropName(), PageImages\Tests\ApiQueryPageImagesTest\hasExpectedProperties(), and ApiQueryPageImages\PARAM_LICENSE_ANY.

◆ 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: