$recentChange = $this->getEditChange( '20131103092153' );
$enhancedChangesList->recentChangesLine( $recentChange, false );
+ $html = $enhancedChangesList->endRecentChangesList();
+ $this->assertRegExp(
+ '/data-mw-revid="5" data-mw-ts="20131103092153" class="[^"]*mw-enhanced-rc[^"]*"/',
+ $html
+ );
+
$recentChange2 = $this->getEditChange( '20131103092253' );
$enhancedChangesList->recentChangesLine( $recentChange2, false );
preg_match_all( '/td class="mw-enhanced-rc-nested"/', $html, $matches );
$this->assertCount( 2, $matches[0] );
+
+ $recentChange3 = $this->getLogChange();
+ $enhancedChangesList->recentChangesLine( $recentChange3, false );
+
+ $html = $enhancedChangesList->endRecentChangesList();
+ $this->assertContains( 'data-mw-logaction="foo/bar"', $html );
+ $this->assertContains( 'data-mw-logid="25"', $html );
}
/**
private function getEditChange( $timestamp ) {
$user = $this->getMutableTestUser()->getUser();
$recentChange = $this->testRecentChangesHelper->makeEditRecentChange(
- $user, 'Cat', $timestamp, 5, 191, 190, 0, 0
+ $user, 'Cat', 0, 5, 191, $timestamp, 0, 0
+ );
+
+ return $recentChange;
+ }
+
+ private function getLogChange() {
+ $user = $this->getMutableTestUser()->getUser();
+ $recentChange = $this->testRecentChangesHelper->makeLogRecentChange( 'foo', 'bar', $user,
+ 'Title', '20131103092153', 0, 0
);
return $recentChange;