From 29a778fa45646928e58868d48bcc07229d3c9826 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 02:18:14 +0000 Subject: [PATCH] MINOR: Fixed PermissionTest assertion (from r96642) (from r98142) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102614 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/security/PermissionTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/security/PermissionTest.php b/tests/security/PermissionTest.php index f944f95c9..527ab3233 100644 --- a/tests/security/PermissionTest.php +++ b/tests/security/PermissionTest.php @@ -58,8 +58,10 @@ class PermissionTest extends SapphireTest { $accessAuthor = $this->objFromFixture('Member', 'author'); $result = Permission::get_members_by_permission(array('CMS_ACCESS_SecurityAdmin')); - - $this->assertEquals($result->First(),$accessMember, "Member is found via a permission attached to a role"); - $this->assertNotEquals($result->First(),$accessAuthor, "Member is not found via a permission attached to a role"); + $resultIDs = $result ? $result->column() : array(); + + $this->assertContains($accessMember->ID, $resultIDs, + 'Member is found via a permission attached to a role'); + $this->assertNotContains($accessAuthor->ID, $resultIDs); } } \ No newline at end of file