$id = $page->getId();
# ------------------------
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'pagelinks', '*', [ 'pl_from' => $id ] );
$n = $res->numRows();
$res->free();
$this->assertTrue( $content->equals( $retrieved ), 'retrieved content doesn\'t equal original' );
# ------------------------
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'pagelinks', '*', [ 'pl_from' => $id ] );
$n = $res->numRows();
$res->free();
$jobs->execute();
# ------------------------
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'pagelinks', '*', [ 'pl_from' => $id ] );
$n = $res->numRows();
$res->free();
$jobs->execute();
# ------------------------
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( 'pagelinks', '*', [ 'pl_from' => $id ] );
$n = $res->numRows();
$res->free();
return [
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"0",
"No more",
null,
- trim( preg_replace( '/^Intro/sm', 'No more', WikiPageTest::$sections ) )
+ trim( preg_replace( '/^Intro/sm', 'No more', self::$sections ) )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"",
"No more",
null,
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"2",
"== TEST ==\nmore fun",
null,
trim( preg_replace( '/^== test ==.*== foo ==/sm',
"== TEST ==\nmore fun\n\n== foo ==",
- WikiPageTest::$sections ) )
+ self::$sections ) )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"8",
"No more",
null,
- trim( WikiPageTest::$sections )
+ trim( self::$sections )
],
[ 'Help:WikiPageTest_testReplaceSection',
CONTENT_MODEL_WIKITEXT,
- WikiPageTest::$sections,
+ self::$sections,
"new",
"No more",
"New",
- trim( WikiPageTest::$sections ) . "\n\n== New ==\n\nNo more"
+ trim( self::$sections ) . "\n\n== New ==\n\nNo more"
],
];
}
# we are having issues with doRollback spuriously failing. Apparently
# the last revision somehow goes missing or not committed under some
# circumstances. So, make sure the last revision has the right user name.
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$this->assertEquals( 3, Revision::countByPageId( $dbr, $page->getId() ) );
$page = new WikiPage( $page->getTitle() );