$this->
assertEquals($result,
$expressionLanguage->
evaluate($expression,
$context));
} public static function provider() { $roles =
['ROLE_USER', 'ROLE_ADMIN'
];
$user =
new InMemoryUser('username', 'password',
$roles);
$noToken = null;
$rememberMeToken =
new RememberMeToken($user, 'firewall-name', 'firewall'
);
$usernamePasswordToken =
new UsernamePasswordToken($user, 'firewall-name',
$roles);
return [ [$noToken, 'is_authenticated()', false
],
[$noToken, 'is_fully_authenticated()', false
],
[$noToken, 'is_remember_me()', false
],
[$rememberMeToken, 'is_authenticated()', true
],
[$rememberMeToken, 'is_fully_authenticated()', false
],
[$rememberMeToken, 'is_remember_me()', true
],
[$rememberMeToken, "is_granted('ROLE_FOO')", false
],
[$rememberMeToken, "is_granted('ROLE_USER')", true
],
[