Skip to content

Commit

Permalink
Merge pull request #7 from arekkas/master
Browse files Browse the repository at this point in the history
Removed Rbac::getStrategy, added Rbac::getTraversalStrategy
  • Loading branch information
bakura10 committed Jan 13, 2014
2 parents 4194b02 + 26c8640 commit e81ce2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Rbac/Rbac.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function isGranted($roles, $permission)
*
* @return TraversalStrategyInterface
*/
public function getStrategy()
public function getTraversalStrategy()
{
return $this->traversalStrategy;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/RbacTest/RbacTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ public function testReturnFalseIfNoRoleHasPermission()
$this->assertFalse($rbac->isGranted($roles, 'permission'));
}

public function testGetStrategy()
public function testGetTraversalStrategy()
{
$customStrategy = $this->getMock('Rbac\Traversal\Strategy\TraversalStrategyInterface');
$rbac = new Rbac($customStrategy);

$this->assertSame($customStrategy, $rbac->getStrategy());
$this->assertSame($customStrategy, $rbac->getTraversalStrategy());
}
}

0 comments on commit e81ce2b

Please sign in to comment.