MediaWiki REL1_30
MWRestrictionsTest Class Reference
Inheritance diagram for MWRestrictionsTest:
Collaboration diagram for MWRestrictionsTest:

Public Member Functions

 provideCheck ()
 
 testArray ( $data, $expect)
 MWRestrictions::newFromArray MWRestrictions::__construct MWRestrictions::loadFromArray MWRestrictions::toArray provideArray.
 
 testCheck ( $request, $expect)
 MWRestrictions::check provideCheck.
 
 testCheckIP ( $ip, $pass)
 MWRestrictions::checkIP provideCheckIP.
 
 testJson ( $json, $expect)
 MWRestrictions::newFromJson MWRestrictions::__construct MWRestrictions::loadFromArray MWRestrictions::toJson MWRestrictions::__toString provideJson.
 
 testNewDefault ()
 MWRestrictions::newDefault MWRestrictions::__construct.
 

Static Public Member Functions

static provideArray ()
 
static provideCheckIP ()
 
static provideJson ()
 
static setUpBeforeClass ()
 

Static Protected Attributes

static $restrictionsForChecks
 

Detailed Description

Definition at line 2 of file MWRestrictionsTest.php.

Member Function Documentation

◆ provideArray()

static MWRestrictionsTest::provideArray ( )
static

Definition at line 54 of file MWRestrictionsTest.php.

References true.

◆ provideCheck()

MWRestrictionsTest::provideCheck ( )

Definition at line 178 of file MWRestrictionsTest.php.

References $request, $ret, and any.

◆ provideCheckIP()

static MWRestrictionsTest::provideCheckIP ( )
static

Definition at line 157 of file MWRestrictionsTest.php.

References false, and true.

◆ provideJson()

static MWRestrictionsTest::provideJson ( )
static

Definition at line 110 of file MWRestrictionsTest.php.

◆ setUpBeforeClass()

static MWRestrictionsTest::setUpBeforeClass ( )
static

Definition at line 6 of file MWRestrictionsTest.php.

References MWRestrictions\newFromArray().

◆ testArray()

MWRestrictionsTest::testArray ( $data,
$expect )

MWRestrictions::newFromArray MWRestrictions::__construct MWRestrictions::loadFromArray MWRestrictions::toArray provideArray.

Parameters
array$data
bool | InvalidArgumentException$expectTrue if the call succeeds, otherwise the exception that should be thrown.

Definition at line 39 of file MWRestrictionsTest.php.

References $ret, and MWRestrictions\newFromArray().

◆ testCheck()

MWRestrictionsTest::testCheck ( $request,
$expect )

MWRestrictions::check provideCheck.

Parameters
WebRequest$request
Status$expect

Definition at line 174 of file MWRestrictionsTest.php.

References $request, and check.

◆ testCheckIP()

MWRestrictionsTest::testCheckIP ( $ip,
$pass )

MWRestrictions::checkIP provideCheckIP.

Parameters
string$ip
bool$pass

Definition at line 153 of file MWRestrictionsTest.php.

◆ testJson()

MWRestrictionsTest::testJson ( $json,
$expect )

MWRestrictions::newFromJson MWRestrictions::__construct MWRestrictions::loadFromArray MWRestrictions::toJson MWRestrictions::__toString provideJson.

Parameters
string$json
array | InvalidArgumentException$expect

Definition at line 87 of file MWRestrictionsTest.php.

References $ret, and MWRestrictions\newFromJson().

◆ testNewDefault()

MWRestrictionsTest::testNewDefault ( )

Member Data Documentation

◆ $restrictionsForChecks

MWRestrictionsTest::$restrictionsForChecks
staticprotected

Definition at line 4 of file MWRestrictionsTest.php.


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