MINOR Added unit test for ViewableData::MultipleOf() when using an offset of 1 (an alternative approach)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95966 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-12-20 23:54:51 +00:00 committed by Sam Minnee
parent 465a15b536
commit f204f96b1f

View File

@ -93,6 +93,22 @@ class DataObjectSetTest extends SapphireTest {
$this->assertFalse($commArr[4]->IsMultipleOf3);
$this->assertFalse($commArr[5]->IsMultipleOf3);
$this->assertTrue($commArr[6]->IsMultipleOf3);
foreach($comments as $comment) {
if($comment->MultipleOf(3, 1)) {
$comment->IsMultipleOf3 = true;
} else {
$comment->IsMultipleOf3 = false;
}
}
$this->assertFalse($commArr[0]->IsMultipleOf3);
$this->assertFalse($commArr[1]->IsMultipleOf3);
$this->assertTrue($commArr[2]->IsMultipleOf3);
$this->assertFalse($commArr[3]->IsMultipleOf3);
$this->assertFalse($commArr[4]->IsMultipleOf3);
$this->assertTrue($commArr[5]->IsMultipleOf3);
$this->assertFalse($commArr[6]->IsMultipleOf3);
}
/**