Total Complexity | 4 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class AuthenticationPluginManagerFactoryTest extends TestCase |
||
13 | { |
||
14 | /** @var AuthenticationPluginManagerFactory */ |
||
15 | private $factory; |
||
16 | |||
17 | public function setUp(): void |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @test |
||
24 | * @dataProvider provideConfigs |
||
25 | */ |
||
26 | public function serviceIsProperlyCreatedWithExpectedPlugins(?array $config, array $expectedPlugins): void |
||
27 | { |
||
28 | $instance = ($this->factory)(new ServiceManager(['services' => [ |
||
29 | 'config' => $config, |
||
30 | ]])); |
||
31 | |||
32 | $this->assertEquals($expectedPlugins, $this->getPlugins($instance)); |
||
33 | } |
||
34 | |||
35 | private function getPlugins(AuthenticationPluginManager $pluginManager): array |
||
36 | { |
||
37 | return (function () { |
||
38 | return $this->services; |
||
|
|||
39 | })->call($pluginManager); |
||
40 | } |
||
41 | |||
42 | public function provideConfigs(): iterable |
||
58 | } |
||
59 | } |
||
60 |