[SiteTreeContentReview::class], Group::class => [ContentReviewOwner::class], Member::class => [ContentReviewOwner::class], CMSPageEditController::class => [ContentReviewCMSExtension::class], SiteConfig::class => [ContentReviewDefaultSettings::class], ]; public function testPagesDueForReviewReport() { /** @var Member $editor */ $editor = $this->objFromFixture(Member::class, "editor"); $this->logInAs($editor); $report = new PagesDueForReviewReport(); $report->parameterFields(); $report->columns(); $report->title(); $results = $report->sourceRecords(array( "ReviewDateAfter" => "01/01/2010", "ReviewDateBefore" => "12/12/2010", )); $this->assertEquals(array( "Contact Us Child", "Home", "About Us", "Staff", "Contact Us", ), $results->column("Title")); DBDatetime::set_mock_now("2010-02-13 00:00:00"); $results = $report->sourceRecords(array()); $this->assertEquals(array( "Home", "About Us", ), $results->column("Title")); DBDatetime::clear_mock_now(); } public function testPagesWithoutReviewScheduleReport() { /** @var Member $editor */ $editor = $this->objFromFixture(Member::class, "editor"); $this->logInAs($editor); $report = new PagesWithoutReviewScheduleReport(); $report->parameterFields(); $report->columns(); $report->title(); $results = $report->sourceRecords(); $this->assertEquals(array( "Home", "About Us", "Page without review date", "Page owned by group", ), $results->column("Title")); } }