public function testNewFromRecentChange()
 {
     $user = $this->getMutableTestUser()->getUser();
     $recentChange = $this->testRecentChangesHelper->makeEditRecentChange($user, 'Xyz', 5, 191, 190, '20131103212153', 0, 0);
     $cacheEntryFactory = new RCCacheEntryFactory($this->getContext(), $this->getMessages(), $this->linkRenderer);
     $cacheEntry = $cacheEntryFactory->newFromRecentChange($recentChange, false);
     $this->assertInstanceOf('RCCacheEntry', $cacheEntry);
     $this->assertEquals(false, $cacheEntry->watched, 'watched');
     $this->assertEquals('21:21', $cacheEntry->timestamp, 'timestamp');
     $this->assertEquals(0, $cacheEntry->numberofWatchingusers, 'watching users');
     $this->assertEquals(false, $cacheEntry->unpatrolled, 'unpatrolled');
     $this->assertUserLinks($user->getName(), $cacheEntry);
     $this->assertTitleLink('Xyz', $cacheEntry);
     $diff = ['curid' => 5, 'diff' => 191, 'oldid' => 190];
     $cur = ['curid' => 5, 'diff' => 0, 'oldid' => 191];
     $this->assertQueryLink('cur', $cur, $cacheEntry->curlink, 'cur link');
     $this->assertQueryLink('prev', $diff, $cacheEntry->lastlink, 'prev link');
     $this->assertQueryLink('diff', $diff, $cacheEntry->difflink, 'diff link');
 }
 private function getEditChange()
 {
     $user = $this->getTestUser();
     $recentChange = $this->testRecentChangesHelper->makeEditRecentChange($user, 'Cat', '20131103212153', 5, 191, 190, 0, 0);
     return $recentChange;
 }
 public function editChangeProvider()
 {
     return array(array(array('title' => 'Xyz', 'user' => 'TestRecentChangesUser', 'diff' => array('curid' => 5, 'diff' => 191, 'oldid' => 190), 'cur' => array('curid' => 5, 'diff' => 0, 'oldid' => 191), 'timestamp' => '21:21', 'numberofWatchingusers' => 0, 'unpatrolled' => false), $this->getContext(), $this->getMessages(), $this->testRecentChangesHelper->makeEditRecentChange($this->getTestUser(), 'Xyz', 5, 191, 190, '20131103212153', 0, 0), false));
 }
 /**
  * @return RecentChange
  */
 private function getEditChange($timestamp)
 {
     $user = $this->getTestUser();
     $recentChange = $this->testRecentChangesHelper->makeEditRecentChange($user, 'Cat', $timestamp, 5, 191, 190, 0, 0);
     return $recentChange;
 }