MediaWiki
REL1_22
|
Database Blocking More...
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 |
Database Blocking
Definition at line 7 of file BlockTest.php.
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().
BlockTest::addXffBlocks | ( | ) | [protected] |
Definition at line 231 of file BlockTest.php.
References $block, array(), as, User\newFromName(), IP\sanitizeIP(), IP\sanitizeRange(), Block\TYPE_IP, and Block\TYPE_RANGE.
Referenced by addDBData().
debug function : dump the ipblocks table
Definition at line 61 of file BlockTest.php.
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().
Definition at line 127 of file BlockTest.php.
References $block, Block\insert(), User\newFromName(), Block\newFromTarget(), and wfTimestampNow().
BlockTest::testBlocksOnXff | ( | $ | xff, |
$ | exCount, | ||
$ | exResult | ||
) |
providerXff
Definition at line 347 of file BlockTest.php.
References $block, Block\chooseBlock(), and Block\getBlocksForIPList().
BlockTest::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.
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().
BlockTest::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.
Regression bug 29116.
provideBug29116Data
Definition at line 114 of file BlockTest.php.
References $block, block, and Block\newFromTarget().
Definition at line 187 of file BlockTest.php.
References $block, $res, $user, array(), Block\newFromID(), User\newFromName(), Block\newFromTarget(), and wfTimestampNow().
Definition at line 69 of file BlockTest.php.
References block, Block\newFromID(), and Block\newFromTarget().
BlockTest::$block [private] |
Definition at line 9 of file BlockTest.php.
Referenced by addXffBlocks(), testBlockedUserCanNotCreateAccount(), testBlocksOnXff(), testBug29116LoadWithEmptyIp(), testBug29116NewFromTargetWithEmptyIp(), and testCrappyCrossWikiBlocks().
BlockTest::$blockId [private] |
Definition at line 12 of file BlockTest.php.
BlockTest::$madeAt |
Definition at line 9 of file BlockTest.php.