Skip to content

Commit

Permalink
Fixed: not using variable where reference is expected in eZRoleTest
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickallaert committed Apr 23, 2012
1 parent c1d2564 commit cf9e86b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/tests/kernel/classes/ezrole_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ public function testFetchIDListByUser()
*/
public function testPolicyList()
{
$role = array_shift( eZRole::fetchByUser( array( self::$anonymousUserID ), true ) );
$policy = array_shift( $role->policyList() );
$roleList = eZRole::fetchByUser( array( self::$anonymousUserID ), true );
$policyList = current( $roleList )->policyList();
$policy = current( $policyList );

// create a temporary copy of one of the role's policies
$policy->createTemporaryCopy();

// check that the role's policies all are final (not temporary)
foreach( $role->policyList() as $policy )
foreach ( $policyList as $policy )
{
$this->assertInstanceOf( 'eZPolicy', $policy );
$this->assertEquals( 0, $policy->attribute( 'original_id' ) );
Expand Down

0 comments on commit cf9e86b

Please sign in to comment.