Fixed tests for PagesDueForReviewReport

This commit is contained in:
Stig Lindqvist 2014-02-25 20:43:46 +13:00
parent ec9b58aea8
commit e123c1c0e7

View File

@ -5,7 +5,6 @@ class ContentReviewReportTest extends FunctionalTest {
public static $fixture_file = 'contentreview/tests/ContentReviewTest.yml'; public static $fixture_file = 'contentreview/tests/ContentReviewTest.yml';
public function testReportContent() { public function testReportContent() {
$this->markTestIncomplete();
$editor = $this->objFromFixture('Member', 'editor'); $editor = $this->objFromFixture('Member', 'editor');
$this->logInAs($editor); $this->logInAs($editor);
$report = new PagesDueForReviewReport(); $report = new PagesDueForReviewReport();
@ -20,18 +19,18 @@ class ContentReviewReportTest extends FunctionalTest {
), 'NextReviewDate ASC', false); ), 'NextReviewDate ASC', false);
$this->assertEquals($results->column('Title'), array( $this->assertEquals($results->column('Title'), array(
'Home', 'Contact Us',
'About Us',
'Staff', 'Staff',
'Contact Us' 'About Us',
'Home'
)); ));
SS_Datetime::set_mock_now('2010-02-13 00:00:00'); SS_Datetime::set_mock_now('2010-02-13 00:00:00');
$results = $report->sourceRecords(array( $results = $report->sourceRecords(array(
), 'NextReviewDate ASC', false); ), 'NextReviewDate ASC', false);
$this->assertEquals($results->column('Title'), array( $this->assertEquals($results->column('Title'), array(
'Home', 'About Us',
'About Us' 'Home'
)); ));
SS_Datetime::clear_mock_now(); SS_Datetime::clear_mock_now();