public 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 RecentlyEditedReport();
     // 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();
 }
Esempio n. 2
0
 public function __construct()
 {
     Deprecation::notice('4.0', 'Use RecentlyEditedReport instead');
     parent::__construct();
 }