16 'wgArticlePath' =>
'/wiki/$1'
24 $recentChange, $watched
27 $cacheEntry = $cacheEntryFactory->newFromRecentChange( $recentChange, $watched );
29 $this->assertInstanceOf(
'RCCacheEntry', $cacheEntry );
31 $this->assertEquals( $watched, $cacheEntry->watched,
'watched' );
32 $this->assertEquals( $expected[
'timestamp'], $cacheEntry->timestamp,
'timestamp' );
34 $expected[
'numberofWatchingusers'], $cacheEntry->numberofWatchingusers,
37 $this->assertEquals( $expected[
'unpatrolled'], $cacheEntry->unpatrolled,
'unpatrolled' );
42 $this->
assertQueryLink(
'cur', $expected[
'cur'], $cacheEntry->curlink,
'cur link' );
43 $this->
assertQueryLink(
'prev', $expected[
'diff'], $cacheEntry->lastlink,
'prev link' );
44 $this->
assertQueryLink(
'diff', $expected[
'diff'], $cacheEntry->difflink,
'diff link' );
53 'diff' =>
array(
'curid' => 5,
'diff' => 191,
'oldid' => 190 ),
54 'cur' =>
array(
'curid' => 5,
'diff' => 0,
'oldid' => 191 ),
55 'timestamp' =>
'21:21',
56 'numberofWatchingusers' => 0,
57 'unpatrolled' =>
false
84 'rc_user' =>
$user->getId(),
85 'rc_user_text' =>
$user->getName(),
86 'rc_this_oldid' => $thisid,
87 'rc_last_oldid' => $lastid,
100 $cacheEntry = $cacheEntryFactory->newFromRecentChange( $recentChange, $watched );
102 $this->assertInstanceOf(
'RCCacheEntry', $cacheEntry );
104 $this->assertEquals( $watched, $cacheEntry->watched,
'watched' );
105 $this->assertEquals( $expected[
'timestamp'], $cacheEntry->timestamp,
'timestamp' );
107 $expected[
'numberofWatchingusers'],
108 $cacheEntry->numberofWatchingusers,
'watching users'
110 $this->assertEquals( $expected[
'unpatrolled'], $cacheEntry->unpatrolled,
'unpatrolled' );
115 $this->assertEquals(
'cur', $cacheEntry->curlink,
'cur link for delete log or rev' );
116 $this->assertEquals(
'diff', $cacheEntry->difflink,
'diff link for delete log or rev' );
117 $this->assertEquals(
'prev', $cacheEntry->lastlink,
'pref link for delete log or rev' );
126 'timestamp' =>
'21:21',
127 'numberofWatchingusers' => 0,
128 'unpatrolled' =>
false
150 'rc_user' =>
$user->getId(),
151 'rc_user_text' =>
$user->getName(),
152 'rc_this_oldid' => 0,
153 'rc_last_oldid' => 0,
154 'rc_old_len' =>
null,
155 'rc_new_len' =>
null,
158 'rc_log_type' =>
'delete',
159 'rc_log_action' =>
'delete'
170 $recentChange, $watched
173 $cacheEntry = $cacheEntryFactory->newFromRecentChange( $recentChange, $watched );
175 $this->assertInstanceOf(
'RCCacheEntry', $cacheEntry );
177 $this->assertEquals( $watched, $cacheEntry->watched,
'watched' );
178 $this->assertEquals( $expected[
'timestamp'], $cacheEntry->timestamp,
'timestamp' );
180 $expected[
'numberofWatchingusers'],
181 $cacheEntry->numberofWatchingusers,
'watching users'
183 $this->assertEquals( $expected[
'unpatrolled'], $cacheEntry->unpatrolled,
'unpatrolled' );
188 $this->assertEquals(
'cur', $cacheEntry->curlink,
'cur link for delete log or rev' );
189 $this->assertEquals(
'diff', $cacheEntry->difflink,
'diff link for delete log or rev' );
190 $this->assertEquals(
'prev', $cacheEntry->lastlink,
'pref link for delete log or rev' );
201 'timestamp' =>
'21:21',
202 'numberofWatchingusers' => 0,
203 'unpatrolled' =>
false
224 $lastid, $counter, $watchingUsers
229 'rc_user' =>
$user->getId(),
230 'rc_user_text' =>
$user->getName(),
232 'rc_cur_id' => $curid,
233 'rc_this_oldid' => $thisid,
234 'rc_last_oldid' => $lastid
245 'attributes' =>
array(
246 'class' =>
'new mw-userlink'
250 $cacheEntry->userlink,
257 'attributes' =>
array(
258 'class' =>
'mw-usertoollinks'
265 $cacheEntry->usertalklink,
266 'verify user talk link'
272 'attributes' =>
array(
273 'class' =>
'mw-usertoollinks'
277 'content' =>
'contribs',
280 $cacheEntry->usertalklink,
281 'verify user tool links'
289 'attributes' =>
array(
290 'href' =>
'/wiki/Special:Log/delete',
291 'title' =>
'Special:Log/delete'
293 'content' =>
'Deletion log'
296 'verify deletion log link'
304 'attributes' =>
array(
305 'class' =>
'history-deleted'
307 'content' =>
'(username removed)'
309 $cacheEntry->userlink,
310 'verify user link for change with deleted revision and user'
318 'attributes' =>
array(
319 'href' =>
'/wiki/' .
$title,
333 'content' => $content
336 'assert query link element'
340 $this->assertRegExp(
'/' . $key .
'=' .
$value .
'/',
$link,
"verify $key link params" );
347 $change->counter = $counter;
348 $change->numberofWatchingusers = $watchingUsers;
357 'rc_user_text' =>
'127.0.0.1',
358 'rc_ip' =>
'127.0.0.1',
372 'rc_log_type' =>
null,
373 'rc_log_action' =>
'',
375 'rc_source' =>
'mw.edit'
382 if ( !
$user->getId() ) {
383 $user->addToDatabase();
394 'enhancedrc-history' =>
'history',
396 'blocklink' =>
'block',
397 'history' =>
'Page history',
398 'semicolon-separator' =>
'; ',
399 'pipe-separator' =>
' | '
407 $context->setTitle(
$title );
411 $context->setUser(
$user );