mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
FIX Broken unit test
This commit is contained in:
parent
d632359853
commit
fa91352105
@ -279,8 +279,8 @@ class ContentReviewSettingsTest extends SapphireTest
|
|||||||
// Parent and child pages have different review dates
|
// Parent and child pages have different review dates
|
||||||
$this->assertNotEquals($parentPage->NextReviewDate, $childPage->NextReviewDate);
|
$this->assertNotEquals($parentPage->NextReviewDate, $childPage->NextReviewDate);
|
||||||
|
|
||||||
// But if we change the parent page ReviewPeriodDays to 10, the childs stays the same
|
// But if we change the parent page ReviewPeriodDays to 30, the childs stays the same
|
||||||
$parentPage->ReviewPeriodDays = 10;
|
$parentPage->ReviewPeriodDays = 30;
|
||||||
$parentPage->write();
|
$parentPage->write();
|
||||||
|
|
||||||
// Flush all the caches!
|
// Flush all the caches!
|
||||||
@ -294,12 +294,12 @@ class ContentReviewSettingsTest extends SapphireTest
|
|||||||
|
|
||||||
// The parent page's date advances, but not the child's
|
// The parent page's date advances, but not the child's
|
||||||
$this->assertEquals('2011-04-12', $childPage->NextReviewDate);
|
$this->assertEquals('2011-04-12', $childPage->NextReviewDate);
|
||||||
$this->assertEquals($this->addDaysToDate(date('Y-m-d'), 10), $parentPage->NextReviewDate);
|
$this->assertEquals($this->addDaysToDate(date('Y-m-d'), 30), $parentPage->NextReviewDate);
|
||||||
|
|
||||||
// Reviewing the child page should, however, advance its review by 10 days
|
// Reviewing the child page should, however, advance its review by 30 days
|
||||||
$childPage->advanceReviewDate();
|
$childPage->advanceReviewDate();
|
||||||
$childPage->write();
|
$childPage->write();
|
||||||
$this->assertEquals($this->addDaysToDate(date('Y-m-d'), 10), $childPage->NextReviewDate);
|
$this->assertEquals($this->addDaysToDate(date('Y-m-d'), 30), $childPage->NextReviewDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user