}
public function getUnknownTagsXML() {
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
'TestImportPage'
]
];
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
}
/**
}
public function getRedirectXML() {
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
null
],
];
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
}
/**
}
public function getSiteInfoXML() {
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
return [
[
<<< EOF
]
],
];
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
}
/**
$n = ( $assign ? 1 : 0 ) + ( $create ? 2 : 0 );
- // @codingStandardsIgnoreStart Generic.Files.LineLength
+ // phpcs:disable Generic.Files.LineLength
$source = $this->getDataSource( <<<EOF
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<page>
</mediawiki>
EOF
);
- // @codingStandardsIgnoreEnd
+ // phpcs:enable
$importer = new WikiImporter( $source, MediaWikiServices::getInstance()->getMainConfig() );
$importer->setUsernamePrefix( 'Xxx', $assign );
$importer->doImport();
$db = wfGetDB( DB_MASTER );
+ $revQuery = Revision::getQueryInfo();
$row = $db->selectRow(
- 'revision',
- [ 'rev_user', 'rev_user_text' ],
+ $revQuery['tables'],
+ $revQuery['fields'],
[ 'rev_timestamp' => $db->timestamp( "201601010{$n}0000" ) ],
- __METHOD__
+ __METHOD__,
+ [],
+ $revQuery['joins']
);
$this->assertSame(
$assign && $create ? 'UserDoesNotExist' : 'Xxx>UserDoesNotExist',
$this->assertSame( $assign && $create ? $hookId : 0, (int)$row->rev_user );
$row = $db->selectRow(
- 'revision',
- [ 'rev_user', 'rev_user_text' ],
+ $revQuery['tables'],
+ $revQuery['fields'],
[ 'rev_timestamp' => $db->timestamp( "201601010{$n}0001" ) ],
- __METHOD__
+ __METHOD__,
+ [],
+ $revQuery['joins']
);
$this->assertSame( ( $assign ? '' : 'Xxx>' ) . $user->getName(), $row->rev_user_text );
$this->assertSame( $assign ? $user->getId() : 0, (int)$row->rev_user );