MediaWiki  REL1_22
ApiBlockTest Class Reference

API Database medium More...

Inheritance diagram for ApiBlockTest:
Collaboration diagram for ApiBlockTest:

List of all members.

Public Member Functions

 addDBData ()
 Stub.
 getTokens ()
 testBlockingActionWithNoToken ($action)
 Attempting to block without a token should give a UsageException with error message: "The token parameter must be set".
 testMakeNormalBlock ()
 This test has probably always been broken and use an invalid token Bug tracking brokenness is https://bugzilla.wikimedia.org/35646.

Static Public Member Functions

static provideBlockUnblockAction ()
 Just provide the 'block' and 'unblock' action to test both API calls.

Protected Member Functions

 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.

Detailed Description

API Database medium

Definition at line 8 of file ApiBlockTest.php.


Member Function Documentation

Stub.

If a test needs to add additional data to the database, it should implement this method and do so

Reimplemented from MediaWikiTestCase.

Definition at line 18 of file ApiBlockTest.php.

References $user, and User\newFromName().

Definition at line 14 of file ApiBlockTest.php.

References ApiTestCase\getTokenList().

Referenced by testMakeNormalBlock().

Just provide the 'block' and 'unblock' action to test both API calls.

Definition at line 89 of file ApiBlockTest.php.

References array().

ApiBlockTest::setUp ( ) [protected]

setUp and tearDown should (where significant) happen in reverse order.

Reimplemented from ApiTestCase.

Definition at line 9 of file ApiBlockTest.php.

References ApiTestCase\doLogin().

Attempting to block without a token should give a UsageException with error message: "The token parameter must be set".

provideBlockUnblockAction UsageException

Definition at line 73 of file ApiBlockTest.php.

References array(), ApiTestCase\doApiRequest(), and user.

This test has probably always been broken and use an invalid token Bug tracking brokenness is https://bugzilla.wikimedia.org/35646.

Root cause is https://gerrit.wikimedia.org/r/3434 Which made the Block/Unblock API to actually verify the token previously always considered valid (bug 34212).

Definition at line 37 of file ApiBlockTest.php.

References $user, array(), ApiTestCase\doApiRequest(), getTokens(), User\newFromName(), Block\newFromTarget(), and user.


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