22 parent::__construct(
$name, $data, $dataName );
31 'wgArticlePath' =>
'/wiki/$1',
43 $line = $oldChangesList->recentChangesLine( $recentChange,
false, $linenumber );
45 $this->assertRegExp( $expected,
$line, $message );
50 [
'/mw-line-odd/', 1,
'odd line number' ],
51 [
'/mw-line-even/', 2,
'even line number' ]
59 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
61 $this->assertRegExp(
'/mw-changeslist-line-not-watched/',
$line );
68 $line = $oldChangesList->recentChangesLine( $recentChange,
true, 1 );
70 $this->assertRegExp(
'/mw-changeslist-line-watched/',
$line );
75 $recentChange = $this->
getLogChange(
'delete',
'delete' );
77 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
79 $this->assertRegExp(
'/href="\/wiki\/Special:Log\/delete/',
$line,
'link has href attribute' );
80 $this->assertRegExp(
'/title="Special:Log\/delete/',
$line,
'link has title attribute' );
81 $this->assertRegExp(
"/dellogpage/",
$line,
'link text' );
88 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
91 '/title=Cat&curid=20131103212153&diff=5&oldid=191/',
97 '/title=Cat&curid=20131103212153&action=history"/',
107 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
109 $this->assertContains(
110 '<abbr class="newpage" title="(recentchanges-label-newpage)">(newpageletter)</abbr>',
115 $this->assertContains(
116 '<abbr class="botedit" title="(recentchanges-label-bot)">(boteditletter)</abbr>',
124 $recentChange->mAttribs[
'ts_tags'] =
'vandalism,newbie';
127 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
129 $this->assertRegExp(
'/<li class="[\w\s-]*mw-tag-vandalism[\w\s-]*">/',
$line );
130 $this->assertRegExp(
'/<li class="[\w\s-]*mw-tag-newbie[\w\s-]*">/',
$line );
137 $recentChange->numberofWatchingusers = 100;
139 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
140 $this->assertRegExp(
"/(number_of_watching_users_RCview: 100)/",
$line );
145 $oldChangesList->setWatchlistDivs(
true );
148 $line = $oldChangesList->recentChangesLine( $recentChange,
false, 1 );
149 $this->assertRegExp(
"/watchlist-0-Cat/",
$line );
155 $recentChange = $this->testRecentChangesHelper->makeNewBotEditRecentChange(
156 $user,
'Abc',
'20131103212153', 5, 191, 190, 0, 0
159 return $recentChange;
165 $recentChange = $this->testRecentChangesHelper->makeLogRecentChange(
166 $logType, $logAction,
$user,
'Abc',
'20131103212153', 0, 0
169 return $recentChange;
174 $recentChange = $this->testRecentChangesHelper->makeEditRecentChange(
175 $user,
'Cat',
'20131103212153', 5, 191, 190, 0, 0
178 return $recentChange;
188 $context = $this->testRecentChangesHelper->getTestContext(
$user );