mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
465a15b536
commit
f204f96b1f
@ -93,6 +93,22 @@ class DataObjectSetTest extends SapphireTest {
|
|||||||
$this->assertFalse($commArr[4]->IsMultipleOf3);
|
$this->assertFalse($commArr[4]->IsMultipleOf3);
|
||||||
$this->assertFalse($commArr[5]->IsMultipleOf3);
|
$this->assertFalse($commArr[5]->IsMultipleOf3);
|
||||||
$this->assertTrue($commArr[6]->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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user