MediaWiki  1.29.2
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. More...
 
 testCheck ( $request, $expect)
 MWRestrictions::check provideCheck. More...
 
 testCheckIP ( $ip, $pass)
 MWRestrictions::checkIP provideCheckIP. More...
 
 testJson ( $json, $expect)
 MWRestrictions::newFromJson MWRestrictions::__construct MWRestrictions::loadFromArray MWRestrictions::toJson MWRestrictions::__toString provideJson. More...
 
 testNewDefault ()
 MWRestrictions::newDefault MWRestrictions::__construct. More...
 

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, $status, any, as, and StatusValue\newGood().

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

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