mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Using built-in ORM methods for GroupTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114135 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
196cabb2f0
commit
ab563c1418
@ -14,13 +14,11 @@ class GroupTest extends FunctionalTest {
|
||||
|
||||
// We will iterate over the map and build mapOuput to more easily call assertions on the result.
|
||||
$map = Group::map();
|
||||
foreach($map as $k => $v) {
|
||||
$mapOutput[$k] = $v;
|
||||
}
|
||||
$mapOutput = $map->getItems()->map('ID', 'Title');
|
||||
|
||||
$group1 = $this->objFromFixture('Group', 'group1');
|
||||
$group2 = $this->objFromFixture('Group', 'group2');
|
||||
|
||||
|
||||
/* We have added 2 groups to our fixture. They should both appear in $mapOutput. */
|
||||
$this->assertEquals($mapOutput[$group1->ID], $group1->Title);
|
||||
$this->assertEquals($mapOutput[$group2->ID], $group2->Title);
|
||||
|
Loading…
Reference in New Issue
Block a user