MediaWiki  master
MediaWiki\Tests\Block\BlockRestrictionStoreTest Class Reference

Database Blocking \MediaWiki\Block\BlockRestrictionStore. More...

Inheritance diagram for MediaWiki\Tests\Block\BlockRestrictionStoreTest:
Collaboration diagram for MediaWiki\Tests\Block\BlockRestrictionStoreTest:

Public Member Functions

 equalsDataProvider ()
 
 setUp ()
 
 tearDown ()
 
 testDelete ()
 ::delete More...
 
 testDeleteAllUpdateByParentBlockId ()
 ::updateByParentBlockId More...
 
 testDeleteByBlockId ()
 ::deleteByBlockId More...
 
 testDeleteByParentBlockId ()
 ::deleteByParentBlockId More...
 
 testEquals (array $a, array $b, $expected)
 ::equals equalsDataProvider More...
 
 testIgnoreNotSupportedTypes ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 
 testInsert ()
 insert More...
 
 testInsertTypes ()
 insert More...
 
 testLoadMultipleRestrictions ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 
 testMappingNamespaceRestrictionObject ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 
 testMappingPageRestrictionObject ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 
 testNoAutoblocksUpdateByParentBlockId ()
 ::updateByParentBlockId More...
 
 testSetBlockId ()
 ::setBlockId More...
 
 testUpdateByParentBlockId ()
 ::updateByParentBlockId More...
 
 testUpdateChange ()
 ::update ::restrictionsByBlockId ::restrictionsToRemove More...
 
 testUpdateInsert ()
 ::update ::restrictionsByBlockId ::restrictionsToRemove More...
 
 testUpdateNoRestrictions ()
 ::update ::restrictionsByBlockId ::restrictionsToRemove More...
 
 testUpdateSame ()
 ::update ::restrictionsByBlockId ::restrictionsToRemove More...
 
 testWithEmptyParam ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 
 testWithNoRestrictions ()
 ::loadByBlockId ::resultToRestrictions ::rowToRestriction More...
 

Protected Member Functions

 insertBlock ()
 
 insertRestriction ( $blockId, $type, $value)
 
 resetTables ()
 
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 

Protected Attributes

BlockRestrictionStore $blockRestrictionStore
 

Detailed Description

Database Blocking \MediaWiki\Block\BlockRestrictionStore.

Definition at line 17 of file BlockRestrictionStoreTest.php.

Member Function Documentation

◆ equalsDataProvider()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::equalsDataProvider ( )

Definition at line 499 of file BlockRestrictionStoreTest.php.

References false, NS_TALK, NS_USER, and true.

◆ insertBlock()

◆ insertRestriction()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::insertRestriction (   $blockId,
  $type,
  $value 
)
protected

◆ resetTables()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::resetTables ( )
protected

◆ setUp()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::setUp ( )

◆ tearDown()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::tearDown ( )

◆ testDelete()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testDelete ( )

◆ testDeleteAllUpdateByParentBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testDeleteAllUpdateByParentBlockId ( )

::updateByParentBlockId

Definition at line 320 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testDeleteByBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testDeleteByBlockId ( )

::deleteByBlockId

Definition at line 436 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testDeleteByParentBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testDeleteByParentBlockId ( )

::deleteByParentBlockId

Definition at line 456 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testEquals()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testEquals ( array  $a,
array  $b,
  $expected 
)

::equals equalsDataProvider

Parameters
array$a
array$b
bool$expected

Definition at line 495 of file BlockRestrictionStoreTest.php.

◆ testIgnoreNotSupportedTypes()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testIgnoreNotSupportedTypes ( )

◆ testInsert()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testInsert ( )

◆ testInsertTypes()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testInsertTypes ( )

◆ testLoadMultipleRestrictions()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testLoadMultipleRestrictions ( )

::loadByBlockId ::resultToRestrictions ::rowToRestriction

Definition at line 38 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock(), and NS_USER.

◆ testMappingNamespaceRestrictionObject()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testMappingNamespaceRestrictionObject ( )

::loadByBlockId ::resultToRestrictions ::rowToRestriction

Definition at line 132 of file BlockRestrictionStoreTest.php.

References class, MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock(), list, NS_USER, and MediaWiki\Block\Restriction\NamespaceRestriction\TYPE.

◆ testMappingPageRestrictionObject()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testMappingPageRestrictionObject ( )

::loadByBlockId ::resultToRestrictions ::rowToRestriction

Definition at line 107 of file BlockRestrictionStoreTest.php.

References $title, class, MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock(), list, and MediaWiki\Block\Restriction\PageRestriction\TYPE.

◆ testNoAutoblocksUpdateByParentBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testNoAutoblocksUpdateByParentBlockId ( )

::updateByParentBlockId

Definition at line 391 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testSetBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testSetBlockId ( )

::setBlockId

Definition at line 564 of file BlockRestrictionStoreTest.php.

References as, and NS_USER.

◆ testUpdateByParentBlockId()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testUpdateByParentBlockId ( )

::updateByParentBlockId

Definition at line 359 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testUpdateChange()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testUpdateChange ( )

::update ::restrictionsByBlockId ::restrictionsToRemove

Definition at line 247 of file BlockRestrictionStoreTest.php.

References DB_REPLICA, and MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testUpdateInsert()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testUpdateInsert ( )

::update ::restrictionsByBlockId ::restrictionsToRemove

Definition at line 215 of file BlockRestrictionStoreTest.php.

References DB_REPLICA, MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock(), and NS_USER.

◆ testUpdateNoRestrictions()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testUpdateNoRestrictions ( )

::update ::restrictionsByBlockId ::restrictionsToRemove

Definition at line 273 of file BlockRestrictionStoreTest.php.

References DB_REPLICA, and MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testUpdateSame()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testUpdateSame ( )

::update ::restrictionsByBlockId ::restrictionsToRemove

Definition at line 293 of file BlockRestrictionStoreTest.php.

References DB_REPLICA, and MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

◆ testWithEmptyParam()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testWithEmptyParam ( )

::loadByBlockId ::resultToRestrictions ::rowToRestriction

Definition at line 74 of file BlockRestrictionStoreTest.php.

◆ testWithNoRestrictions()

MediaWiki\Tests\Block\BlockRestrictionStoreTest::testWithNoRestrictions ( )

::loadByBlockId ::resultToRestrictions ::rowToRestriction

Definition at line 63 of file BlockRestrictionStoreTest.php.

References MediaWiki\Tests\Block\BlockRestrictionStoreTest\insertBlock().

Member Data Documentation

◆ $blockRestrictionStore

BlockRestrictionStore MediaWiki\Tests\Block\BlockRestrictionStoreTest::$blockRestrictionStore
protected

Definition at line 20 of file BlockRestrictionStoreTest.php.


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