Skip to content

Commit

Permalink
MINOR Using built-in ORM methods for GroupTest
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114135 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 24, 2010
1 parent 196cabb commit ab563c1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/security/GroupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ function testGroupMap() {

// 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);
Expand Down

0 comments on commit ab563c1

Please sign in to comment.