MediaWiki  master
MediaWiki\Tests\Storage\PageUpdaterTest Class Reference

\MediaWiki\Storage\PageUpdater Database More...

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

Public Member Functions

 provideMagicWords ()
 
 provideSetRcPatrolStatus ( $patrolled)
 
 provideSetUsePageCreationLog ()
 
 setUp ()
 
 testCompareAndSwapFailure ()
 \MediaWiki\Storage\PageUpdater::grabParentRevision() \MediaWiki\Storage\PageUpdater::saveRevision() More...
 
 testCreatePage ()
 \MediaWiki\Storage\PageUpdater::saveRevision() \WikiPage::newPageUpdater() More...
 
 testFailureOnBadContentModel ()
 \MediaWiki\Storage\PageUpdater::saveRevision() More...
 
 testFailureOnEditFlags ()
 \MediaWiki\Storage\PageUpdater::saveRevision() More...
 
 testInheritSlot ()
 \MediaWiki\Storage\PageUpdater::inheritSlot() \MediaWiki\Storage\PageUpdater::setContent() More...
 
 testMagicWords ( $wikitext, $callback, $subst=false)
 \MediaWiki\Storage\PageUpdater::saveRevision() More...
 
 testSetRcPatrolStatus ( $patrolled)
 provideSetRcPatrolStatus \MediaWiki\Storage\PageUpdater::setRcPatrolStatus() More...
 
 testSetUseAutomaticEditSummaries ()
 
 testSetUsePageCreationLog ( $use, $expected)
 provideSetUsePageCreationLog More...
 
 testUpdatePage ()
 \MediaWiki\Storage\PageUpdater::saveRevision() \WikiPage::newPageUpdater() More...
 

Private Member Functions

 createRevision (WikiPage $page, $summary, $content=null)
 Creates a revision in the database. More...
 
 getDummyTitle ( $method)
 
 getRecentChangeFor ( $revId)
 

Detailed Description

\MediaWiki\Storage\PageUpdater Database

Definition at line 23 of file PageUpdaterTest.php.

Member Function Documentation

◆ createRevision()

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

Creates a revision in the database.

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

Definition at line 249 of file PageUpdaterTest.php.

References $content, $rev, $user, Revision\SlotRecord\MAIN, WikiPage\newPageUpdater(), and CommentStoreComment\newUnsavedComment().

Referenced by MediaWiki\Tests\Storage\PageUpdaterTest\testCompareAndSwapFailure(), and MediaWiki\Tests\Storage\PageUpdaterTest\testFailureOnEditFlags().

◆ getDummyTitle()

◆ getRecentChangeFor()

MediaWiki\Tests\Storage\PageUpdaterTest::getRecentChangeFor (   $revId)
private

◆ provideMagicWords()

MediaWiki\Tests\Storage\PageUpdaterTest::provideMagicWords ( )

Definition at line 533 of file PageUpdaterTest.php.

References $rev.

◆ provideSetRcPatrolStatus()

MediaWiki\Tests\Storage\PageUpdaterTest::provideSetRcPatrolStatus (   $patrolled)

◆ provideSetUsePageCreationLog()

MediaWiki\Tests\Storage\PageUpdaterTest::provideSetUsePageCreationLog ( )

Definition at line 504 of file PageUpdaterTest.php.

◆ setUp()

MediaWiki\Tests\Storage\PageUpdaterTest::setUp ( )

◆ testCompareAndSwapFailure()

MediaWiki\Tests\Storage\PageUpdaterTest::testCompareAndSwapFailure ( )

◆ testCreatePage()

◆ testFailureOnBadContentModel()

MediaWiki\Tests\Storage\PageUpdaterTest::testFailureOnBadContentModel ( )

◆ testFailureOnEditFlags()

◆ testInheritSlot()

MediaWiki\Tests\Storage\PageUpdaterTest::testInheritSlot ( )

◆ testMagicWords()

MediaWiki\Tests\Storage\PageUpdaterTest::testMagicWords (   $wikitext,
  $callback,
  $subst = false 
)

\MediaWiki\Storage\PageUpdater::saveRevision()

Integration test for PageUpdater, DerivedPageDataUpdater, RevisionRenderer and RenderedRevision, that ensures that magic words depending on revision meta-data are handled correctly. Note that each magic word needs to be tested separately, to assert correct behavior for each "vary" flag in the ParserOutput.

provideMagicWords

Definition at line 589 of file PageUpdaterTest.php.

References $html, $output, $rev, $title, $user, EDIT_UPDATE, WikiPage\factory(), MediaWiki\Tests\Storage\PageUpdaterTest\getDummyTitle(), Revision\SlotRecord\MAIN, ParserOptions\newCanonical(), User\newFromName(), and CommentStoreComment\newUnsavedComment().

◆ testSetRcPatrolStatus()

MediaWiki\Tests\Storage\PageUpdaterTest::testSetRcPatrolStatus (   $patrolled)

◆ testSetUseAutomaticEditSummaries()

◆ testSetUsePageCreationLog()

MediaWiki\Tests\Storage\PageUpdaterTest::testSetUsePageCreationLog (   $use,
  $expected 
)

◆ testUpdatePage()


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