MediaWiki  REL1_22
BlockTest Class Reference

Database Blocking More...

Inheritance diagram for BlockTest:
Collaboration diagram for BlockTest:

List of all members.

Public Member Functions

 addDBData ()
 Stub.
 dumpBlocks ()
 debug function : dump the ipblocks table
 testBlockedUserCanNotCreateAccount ()
 testBlocksOnXff ($xff, $exCount, $exResult)
 providerXff
 testBug26425BlockTimestampDefaultsToTime ()
 per bug 26425
 testBug29116LoadWithEmptyIp ($vagueTarget)
 This is the method previously used to load block info in CheckUser etc passing an empty value (empty string, null, etc) as the ip parameter bypasses IP lookup checks.
 testBug29116NewFromTargetWithEmptyIp ($vagueTarget)
 CheckUser since being changed to use Block::newFromTarget started failing because the new function didn't accept empty strings like Block::load() had.
 testCrappyCrossWikiBlocks ()
 testInitializerFunctionsReturnCorrectBlock ()

Static Public Member Functions

static provideBug29116Data ()
static providerXff ()

Public Attributes

 $madeAt

Protected Member Functions

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

Private Attributes

 $block
 $blockId

Detailed Description

Database Blocking

Definition at line 7 of file BlockTest.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 22 of file BlockTest.php.

References $user, addXffBlocks(), block, User\newFromName(), Block\newFromTarget(), and wfTimestamp().

debug function : dump the ipblocks table

Definition at line 61 of file BlockTest.php.

References as, and print.

static BlockTest::provideBug29116Data ( ) [static]

Definition at line 119 of file BlockTest.php.

References array().

static BlockTest::providerXff ( ) [static]

Definition at line 299 of file BlockTest.php.

References array().

BlockTest::setUp ( ) [protected]

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

Reimplemented from MediaWikiLangTestCase.

Definition at line 14 of file BlockTest.php.

References array(), Language\factory(), and MediaWikiTestCase\setMwGlobals().

BlockTest::testBlocksOnXff ( xff,
exCount,
exResult 
)

providerXff

Definition at line 347 of file BlockTest.php.

References $block, Block\chooseBlock(), and Block\getBlocksForIPList().

per bug 26425

Definition at line 80 of file BlockTest.php.

References block.

This is the method previously used to load block info in CheckUser etc passing an empty value (empty string, null, etc) as the ip parameter bypasses IP lookup checks.

This stopped working with r84475 and friends: regression being fixed for bug 29116.

provideBug29116Data

Definition at line 94 of file BlockTest.php.

References $block, $ok, block, MediaWikiTestCase\hideDeprecated(), and User\idFromName().

CheckUser since being changed to use Block::newFromTarget started failing because the new function didn't accept empty strings like Block::load() had.

Regression bug 29116.

provideBug29116Data

Definition at line 114 of file BlockTest.php.

References $block, block, and Block\newFromTarget().


Member Data Documentation

BlockTest::$blockId [private]

Definition at line 12 of file BlockTest.php.

BlockTest::$madeAt

Definition at line 9 of file BlockTest.php.


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