Permalink
Browse files

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
  • Loading branch information...
1 parent 196cabb commit ab563c14187dd26265639f0439ffd5de134be1df @chillu chillu committed Nov 24, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 tests/security/GroupTest.php
@@ -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);

0 comments on commit ab563c1

Please sign in to comment.