/** * Consider if role equals to another role. * * @param Role $role Role to compare with. * * @return bool */ public function equals(Role $role) { return $this->getFullName() == $role->getFullName(); }
function it_does_not_equal_to_different_role(Role $role) { $role->getFullName()->willReturn('other_role'); $this->equals($role); }