MediaWiki  master
MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest Class Reference

Database. More...

Inheritance diagram for MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest:
Collaboration diagram for MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest:

Public Member Functions

 provideIsReusableFor ()
 
 tearDown ()
 
 testDoParserCacheUpdate ()
 \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate() More...
 
 testDoUpdates ()
 \MediaWiki\Storage\DerivedPageDataUpdater::doUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doSecondaryDataUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate() More...
 
 testDoUpdatesCacheSaveDeferral_canonical ()
 \MediaWiki\Storage\DerivedPageDataUpdater::doUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doSecondaryDataUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate() More...
 
 testDoUpdatesCacheSaveDeferral_noncanonical ()
 \MediaWiki\Storage\DerivedPageDataUpdater::doUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doSecondaryDataUpdates() \MediaWiki\Storage\DerivedPageDataUpdater::doParserCacheUpdate() More...
 
 testGetCanonicalParserOptions ()
 \MediaWiki\Storage\DerivedPageDataUpdater::getCanonicalParserOptions() More...
 
 testGetPreparedEditAfterPrepareContent ()
 \MediaWiki\Storage\DerivedPageDataUpdater::getPreparedEdit() More...
 
 testGetPreparedEditAfterPrepareUpdate ()
 \MediaWiki\Storage\DerivedPageDataUpdater::getPreparedEdit() More...
 
 testGetSecondaryDataUpdatesAfterPrepareContent ()
 
 testGetSecondaryDataUpdatesWithSlotRemoval ()
 
 testGrabCurrentRevision ()
 \MediaWiki\Storage\DerivedPageDataUpdater::grabCurrentRevision() \MediaWiki\Storage\DerivedPageDataUpdater::pageExisted() More...
 
 testIsReusableFor (User $prepUser=null, RevisionRecord $prepRevision=null, RevisionSlotsUpdate $prepUpdate=null, User $forUser=null, RevisionRecord $forRevision=null, RevisionSlotsUpdate $forUpdate=null, $forParent=null, $isReusable=null)
 provideIsReusableFor \MediaWiki\Storage\DerivedPageDataUpdater::isReusableFor() More...
 
 testPrepareContent ()
 \MediaWiki\Storage\DerivedPageDataUpdater::prepareContent() \MediaWiki\Storage\DerivedPageDataUpdater::isContentPrepared() \MediaWiki\Storage\DerivedPageDataUpdater::pageExisted() \MediaWiki\Storage\DerivedPageDataUpdater::isCreation() \MediaWiki\Storage\DerivedPageDataUpdater::isChange() \MediaWiki\Storage\DerivedPageDataUpdater::getSlots() \MediaWiki\Storage\DerivedPageDataUpdater::getRawSlot() \MediaWiki\Storage\DerivedPageDataUpdater::getRawContent() \MediaWiki\Storage\DerivedPageDataUpdater::getModifiedSlotRoles() \MediaWiki\Storage\DerivedPageDataUpdater::getTouchedSlotRoles() \MediaWiki\Storage\DerivedPageDataUpdater::getSlotParserOutput() \MediaWiki\Storage\DerivedPageDataUpdater::getCanonicalParserOutput() More...
 
 testPrepareContentInherit ()
 \MediaWiki\Storage\DerivedPageDataUpdater::prepareContent() \MediaWiki\Storage\DerivedPageDataUpdater::pageExisted() \MediaWiki\Storage\DerivedPageDataUpdater::isCreation() \MediaWiki\Storage\DerivedPageDataUpdater::isChange() More...
 
 testPrepareUpdate ()
 \MediaWiki\Storage\DerivedPageDataUpdater::prepareUpdate() \MediaWiki\Storage\DerivedPageDataUpdater::isUpdatePrepared() \MediaWiki\Storage\DerivedPageDataUpdater::isCreation() \MediaWiki\Storage\DerivedPageDataUpdater::getSlots() \MediaWiki\Storage\DerivedPageDataUpdater::getRawSlot() \MediaWiki\Storage\DerivedPageDataUpdater::getRawContent() \MediaWiki\Storage\DerivedPageDataUpdater::getModifiedSlotRoles() \MediaWiki\Storage\DerivedPageDataUpdater::getTouchedSlotRoles() \MediaWiki\Storage\DerivedPageDataUpdater::getSlotParserOutput() \MediaWiki\Storage\DerivedPageDataUpdater::getCanonicalParserOutput() More...
 
 testPrepareUpdateOutputReset ()
 \MediaWiki\Storage\DerivedPageDataUpdater::prepareUpdate() \MediaWiki\Storage\DerivedPageDataUpdater::getSlotParserOutput() More...
 
 testPrepareUpdateReusesParserOutput ()
 \MediaWiki\Storage\DerivedPageDataUpdater::prepareUpdate() More...
 

Private Member Functions

 createMockContent (ContentHandler $handler, $text)
 
 createRevision (WikiPage $page, $summary, $content=null, $user=null)
 Creates a revision in the database. More...
 
 defineMockContentModelForUpdateTesting ( $name)
 
 getDerivedPageDataUpdater ( $page, RevisionRecord $rec=null, User $user=null)
 
 getMockTitle ( $id=23)
 
 getPage ( $title)
 
 getTitle ( $title)
 
 hasMultiSlotSupport ()
 
 makeRevision (Title $title, RevisionSlotsUpdate $update, User $user, $comment, $id=0, $parentId=0)
 Creates a dummy revision object without touching the database. More...
 

Detailed Description

Database.

\MediaWiki\Storage\DerivedPageDataUpdater

Definition at line 34 of file DerivedPageDataUpdaterTest.php.

Member Function Documentation

◆ createMockContent()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::createMockContent ( ContentHandler  $handler,
  $text 
)
private

◆ createRevision()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::createRevision ( WikiPage  $page,
  $summary,
  $content = null,
  $user = null 
)
private

Creates a revision in the database.

Parameters
WikiPage$page
string | Message | CommentStoreComment$summary
null | string | Content$content
User | null$user
Returns
RevisionRecord|null

Definition at line 90 of file DerivedPageDataUpdaterTest.php.

References $content, $rev, $user, as, MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\getDerivedPageDataUpdater(), WikiPage\newPageUpdater(), CommentStoreComment\newUnsavedComment(), and null.

Referenced by MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoParserCacheUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdates(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdatesCacheSaveDeferral_canonical(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdatesCacheSaveDeferral_noncanonical(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetCanonicalParserOptions(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetPreparedEditAfterPrepareUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetSecondaryDataUpdatesAfterPrepareContent(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetSecondaryDataUpdatesWithSlotRemoval(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGrabCurrentRevision(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareContentInherit(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdateOutputReset(), and MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdateReusesParserOutput().

◆ defineMockContentModelForUpdateTesting()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::defineMockContentModelForUpdateTesting (   $name)
private

◆ getDerivedPageDataUpdater()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::getDerivedPageDataUpdater (   $page,
RevisionRecord  $rec = null,
User  $user = null 
)
private
Parameters
string | Title | WikiPage$page
RevisionRecord | null$rec
User | null$user
Returns
DerivedPageDataUpdater

Definition at line 69 of file DerivedPageDataUpdaterTest.php.

References $user, and MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\getPage().

Referenced by MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\createRevision(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoParserCacheUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdates(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdatesCacheSaveDeferral_canonical(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoUpdatesCacheSaveDeferral_noncanonical(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetCanonicalParserOptions(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetPreparedEditAfterPrepareContent(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetPreparedEditAfterPrepareUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetSecondaryDataUpdatesAfterPrepareContent(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetSecondaryDataUpdatesWithSlotRemoval(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGrabCurrentRevision(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testIsReusableFor(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareContent(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareContentInherit(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdate(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdateOutputReset(), and MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testPrepareUpdateReusesParserOutput().

◆ getMockTitle()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::getMockTitle (   $id = 23)
private
Parameters
int$id
Returns
Title

Definition at line 687 of file DerivedPageDataUpdaterTest.php.

References class.

Referenced by MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\provideIsReusableFor().

◆ getPage()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::getPage (   $title)
private

◆ getTitle()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::getTitle (   $title)
private
Parameters
string$title
Returns
Title

Definition at line 47 of file DerivedPageDataUpdaterTest.php.

References $title, and Title\makeTitleSafe().

Referenced by MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\getPage().

◆ hasMultiSlotSupport()

◆ makeRevision()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::makeRevision ( Title  $title,
RevisionSlotsUpdate  $update,
User  $user,
  $comment,
  $id = 0,
  $parentId = 0 
)
private

Creates a dummy revision object without touching the database.

Parameters
Title$title
RevisionSlotsUpdate$update
User$user
string$comment
int$id
int$parentId
Returns
MutableRevisionRecord

Definition at line 660 of file DerivedPageDataUpdaterTest.php.

References $rev, Title\getArticleID(), and CommentStoreComment\newUnsavedComment().

Referenced by MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\provideIsReusableFor(), MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testDoParserCacheUpdate(), and MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\testGetCanonicalParserOptions().

◆ provideIsReusableFor()

◆ tearDown()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::tearDown ( )

Definition at line 36 of file DerivedPageDataUpdaterTest.php.

◆ testDoParserCacheUpdate()

◆ testDoUpdates()

◆ testDoUpdatesCacheSaveDeferral_canonical()

◆ testDoUpdatesCacheSaveDeferral_noncanonical()

◆ testGetCanonicalParserOptions()

◆ testGetPreparedEditAfterPrepareContent()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::testGetPreparedEditAfterPrepareContent ( )

◆ testGetPreparedEditAfterPrepareUpdate()

◆ testGetSecondaryDataUpdatesAfterPrepareContent()

◆ testGetSecondaryDataUpdatesWithSlotRemoval()

◆ testGrabCurrentRevision()

◆ testIsReusableFor()

MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest::testIsReusableFor ( User  $prepUser = null,
RevisionRecord  $prepRevision = null,
RevisionSlotsUpdate  $prepUpdate = null,
User  $forUser = null,
RevisionRecord  $forRevision = null,
RevisionSlotsUpdate  $forUpdate = null,
  $forParent = null,
  $isReusable = null 
)

provideIsReusableFor \MediaWiki\Storage\DerivedPageDataUpdater::isReusableFor()

Parameters
User | null$prepUser
RevisionRecord | null$prepRevision
RevisionSlotsUpdate | null$prepUpdate
User | null$forUser
RevisionRecord | null$forRevision
RevisionSlotsUpdate | null$forUpdate
int | null$forParent
bool$isReusable

Definition at line 851 of file DerivedPageDataUpdaterTest.php.

References MediaWiki\Tests\Storage\DerivedPageDataUpdaterTest\getDerivedPageDataUpdater().

◆ testPrepareContent()

◆ testPrepareContentInherit()

◆ testPrepareUpdate()

◆ testPrepareUpdateOutputReset()

◆ testPrepareUpdateReusesParserOutput()


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