function testRecentlyEdited()
 {
     SS_Datetime::set_mock_now('31-06-2009 00:00:00');
     $after = $this->objFromFixture('SiteTree', 'after');
     $before = $this->objFromFixture('SiteTree', 'before');
     $r = new SideReport_RecentlyEdited();
     // check if contains only elements not older than $daysAgo days
     $this->assertNotNull($r->records(array()));
     $this->assertContains($after->ID, $r->records(array())->column('ID'));
     $this->assertNotContains($before->ID, $r->records(array())->column('ID'));
     SS_DateTime::clear_mock_now();
 }
 public function sourceRecords($params = null)
 {
     $records = parent::sourceRecords($params);
     $site = isset($params['Site']) ? (int) $params['Site'] : 0;
     if ($site > 0) {
         $records = $records->filter('SiteID', $site);
     }
     return $records;
 }