/** * @test */ public function hasRoleWorksOnRoleInstancesWithTheSameIdentifier() { $account = new Account(); $account->addRole(new Role('role1')); $this->assertEquals(array($this->role1), $account->getRoles()); }