MediaWiki REL1_31
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 56 of file MWRestrictionsTest.php.

References true.

◆ provideCheck()

MWRestrictionsTest::provideCheck ( )

Definition at line 180 of file MWRestrictionsTest.php.

References $request, $ret, and as.

◆ provideCheckIP()

static MWRestrictionsTest::provideCheckIP ( )
static

Definition at line 159 of file MWRestrictionsTest.php.

References false, and true.

◆ provideJson()

static MWRestrictionsTest::provideJson ( )
static

Definition at line 112 of file MWRestrictionsTest.php.

◆ setUpBeforeClass()

static MWRestrictionsTest::setUpBeforeClass ( )
static

Definition at line 8 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 41 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 176 of file MWRestrictionsTest.php.

References $request, and check.

◆ testCheckIP()

MWRestrictionsTest::testCheckIP (   $ip,
  $pass 
)

MWRestrictions::checkIP provideCheckIP.

Parameters
string$ip
bool$pass

Definition at line 155 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 89 of file MWRestrictionsTest.php.

References $ret, and MWRestrictions\newFromJson().

◆ testNewDefault()

MWRestrictionsTest::testNewDefault ( )

Member Data Documentation

◆ $restrictionsForChecks

MWRestrictionsTest::$restrictionsForChecks
staticprotected

Definition at line 6 of file MWRestrictionsTest.php.


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