public function nonAuthenticatedUsersHaveTheEverybodyAndAnonymousRole()
{
$hasEverybodyRole = false;
$hasAnonymousRole = false;
foreach ($this->securityContext->getRoles() as $role) {
if ((string) $role === 'Neos.Flow:Everybody') {
$hasEverybodyRole = true;
}
if ((string) $role === 'Neos.Flow:Anonymous') {
$hasAnonymousRole = true;
}
}
$this->assertEquals(2, count($this->securityContext->getRoles()));
$this->assertTrue($this->securityContext->hasRole('Neos.Flow:Everybody'), 'Everybody - hasRole()');
$this->assertTrue($hasEverybodyRole, 'Everybody - getRoles()');
$this->assertTrue($this->securityContext->hasRole('Neos.Flow:Anonymous'), 'Anonymous - hasRole()');
$this->assertTrue($hasAnonymousRole, 'Anonymous - getRoles()');
}