zendframework/zf2 — pull request #5973 by jmleroux (2014-03-14 15:30:57+00:00)
Title: Rbac::getRole() : check object->getName()

We know that `$objectOrName`, can only be `string` or `RoleInterface`.

So if it's an object, we can check with `getName()` method.

If found it usefull for some unit tests which did not pass because `$leaf` and `$objectOrName` were not the same when `$objectOrName` was a mock.

In this case, the test ```$leaf == $objectOrName``` was false when it should be true because the two objects had the same name property.