$this->
assertSame('security',
$collector->
getName());
$this->
assertFalse($collector->
isEnabled());
$this->
assertFalse($collector->
isAuthenticated());
$this->
assertFalse($collector->
isImpersonated());
$this->
assertNull($collector->
getImpersonatorUser());
$this->
assertNull($collector->
getImpersonationExitPath());
$this->
assertNull($collector->
getTokenClass());
$this->
assertFalse($collector->
supportsRoleHierarchy());
$this->
assertCount(0,
$collector->
getRoles());
$this->
assertCount(0,
$collector->
getInheritedRoles());
$this->
assertEmpty($collector->
getUser());
$this->
assertNull($collector->
getFirewall());
} public function testCollectWhenAuthenticationTokenIsNull() { $tokenStorage =
new TokenStorage();
$collector =
new SecurityDataCollector($tokenStorage,
$this->
getRoleHierarchy(), null, null, null, null, true
);
$collector->
collect(new Request(),
new Response());
$this->
assertTrue($collector->
isEnabled());
$this->
assertFalse($collector->
isAuthenticated());
$this->
assertFalse($collector->
isImpersonated());