abstract class AccessDecisionStrategyTestCase extends TestCase
{ /**
* @dataProvider provideStrategyTests
*
* @param VoterInterface[] $voters
*/
final public function testDecide(AccessDecisionStrategyInterface
$strategy, array
$voters, bool
$expected) { $token =
$this->
createMock(TokenInterface::
class);
$manager =
new AccessDecisionManager($voters,
$strategy);
$this->
assertSame($expected,
$manager->
decide($token,
['ROLE_FOO'
]));
} /**
* @return iterable<array{AccessDecisionStrategyInterface, VoterInterface[], bool}>
*/
abstract public static function provideStrategyTests(): iterable;
/**
* @return VoterInterface[]
*/