ObjectCache::$instances[CACHE_DB] = new HashBagOStuff;
$needsResetDB = false;
- $logName = get_class( $this ) . '::' . $this->getName( false );
if ( $this->needsDB() ) {
// set up a DB connection for this test to use
protected function insertPage( $pageName, $text = 'Sample page for unit test.' ) {
$title = Title::newFromText( $pageName, 0 );
- $user = User::newFromName( 'WikiSysop' );
+ $user = User::newFromName( 'UTSysop' );
$comment = __METHOD__ . ': Sample page for unit test.';
// Avoid memory leak...?
'UTPageSummary',
EDIT_NEW,
false,
- User::newFromName( 'UTSysop' )
+ $user
);
}
}
* @param string $msg
*/
private function assertEmpty2( $value, $msg ) {
- return $this->assertTrue( $value == '', $msg );
+ $this->assertTrue( $value == '', $msg );
}
private static function unprefixTable( $tableName ) {
/**
* @since 1.18
*
- * @param DataBaseBase $db
+ * @param DatabaseBase $db
*
* @return array
*/
* @param string $function
*/
public function hideDeprecated( $function ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
wfDeprecated( $function );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
/**
# This check may also protect against code injection in
# case of broken installations.
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$haveDiff3 = $wgDiff3 && file_exists( $wgDiff3 );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
if ( !$haveDiff3 ) {
$this->markTestSkipped( "Skip test, since diff3 is not configured" );