MediaWiki  master
ApiQueryTest Class Reference

API Database medium ApiQuery. More...

Inheritance diagram for ApiQueryTest:
Collaboration diagram for ApiQueryTest:

Public Member Functions

 provideTestTitlePartToKey ()
 testClassNamesInModuleManager ()
 Test if all classes in the query module manager exists. More...
 testShouldNotExportPagesThatUserCanNotRead ()
 testTitlePartToKey ( $titlePart, $namespace, $expected, $expectException)
 Test the ApiBase::titlePartToKey function. More...
 testTitlesAreRejectedIfInvalid ()
 testTitlesGetNormalized ()
 testTitlesWithWhitespaces ()
- Public Member Functions inherited from ApiTestCase
 testApiTestGroup ()

Protected Member Functions

 setUp ()
- Protected Member Functions inherited from ApiTestCase
 doApiRequest (array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
 Does the API request and returns the result. More...
 doApiRequestWithToken (array $params, array $session=null, User $user=null, $tokenType='auto')
 Convenience function to access the token parameter of doApiRequest() more succinctly. More...
 doLogin ( $testUser=null)
 Previously this would do API requests to log in, as well as setting $wgUser and the request context's user. More...
 getTokenList (TestUser $user, $session=null)
 setExpectedApiException ( $msg, $code=null, array $data=null, $httpCode=0)
 Expect an ApiUsageException to be thrown with the given parameters, which are the same as ApiUsageException::newWithMessage()'s parameters. More...
 setUp ()
 tearDown ()
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()

Additional Inherited Members

- Static Public Member Functions inherited from ApiTestCase
static apiExceptionHasCode (ApiUsageException $ex, $code)
- Static Protected Member Functions inherited from ApiTestCase
static getErrorFormatter ()
- Protected Attributes inherited from ApiTestCase
ApiTestContext $apiContext
- Static Protected Attributes inherited from ApiTestCase
static $apiUrl
static $errorFormatter = null

Detailed Description

API Database medium ApiQuery.

Definition at line 9 of file ApiQueryTest.php.

Member Function Documentation

◆ provideTestTitlePartToKey()

ApiQueryTest::provideTestTitlePartToKey ( )

Definition at line 121 of file ApiQueryTest.php.

References false, NS_CATEGORY, NS_MAIN, null, and true.

◆ setUp()

ApiQueryTest::setUp ( )

Definition at line 10 of file ApiQueryTest.php.

◆ testClassNamesInModuleManager()

ApiQueryTest::testClassNamesInModuleManager ( )

Test if all classes in the query module manager exists.

Definition at line 137 of file ApiQueryTest.php.

References $modules, $name, and as.

◆ testShouldNotExportPagesThatUserCanNotRead()

ApiQueryTest::testShouldNotExportPagesThatUserCanNotRead ( )

◆ testTitlePartToKey()

ApiQueryTest::testTitlePartToKey (   $titlePart,

Test the ApiBase::titlePartToKey function.


Definition at line 105 of file ApiQueryTest.php.

References $e.

◆ testTitlesAreRejectedIfInvalid()

ApiQueryTest::testTitlesAreRejectedIfInvalid ( )

Definition at line 62 of file ApiQueryTest.php.

References $title, ApiTestCase\doApiRequest(), and Title\newFromText().

◆ testTitlesGetNormalized()

ApiQueryTest::testTitlesGetNormalized ( )

◆ testTitlesWithWhitespaces()

ApiQueryTest::testTitlesWithWhitespaces ( )

Definition at line 83 of file ApiQueryTest.php.

References ApiTestCase\doApiRequest().

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