1 | <?php declare(strict_types = 1); |
||
13 | class SymfonyInteropContainerTest extends SymfonyInteropContainerTestCase |
||
14 | { |
||
15 | const FIXTURE_CONGIGS_DIR = __DIR__ . '/fixtures/'; |
||
16 | |||
17 | /** @var SymfonyInteropContainer */ |
||
18 | private $interopContainer; |
||
19 | |||
20 | public function setUp() |
||
34 | |||
35 | public function testHas_WithBadType_ShouldThrowContainerException() |
||
41 | |||
42 | public function testHas_NotExistingService_ShouldReturnFalse() |
||
48 | |||
49 | public function testHas_ConfigKey_ShouldReturnTrue() |
||
55 | |||
56 | public function testHas_ExistingService_ShouldReturnTrue() |
||
62 | |||
63 | public function testGet_WithBadType_ShouldThrowContainerException() |
||
69 | |||
70 | public function testGet_NotExistingService_ShouldThrowNotFoundException() |
||
76 | |||
77 | public function testGet_ExistingTestServiceFromConfig_ShouldBeInstanceOfTestService() |
||
83 | |||
84 | public function testGet_ConfigKey_ShouldContainTestExtensionConfig() |
||
90 | |||
91 | /** |
||
92 | * @param string[] $bundles |
||
93 | * @param ConfigFile[] $configFiles |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | private function givenInteropContainerFromBootedKernelWith(array $bundles = [], array $configFiles = []): void |
||
102 | |||
103 | private function willThrowException($class): void |
||
107 | |||
108 | private function whenAskInteropContainerWhetherHasKey($key) |
||
112 | |||
113 | private function thenResultIsTrue($has): void |
||
117 | |||
118 | private function thenResultIsFalse($has): void |
||
122 | |||
123 | private function whenGetFromInteropContainerByKey($key) |
||
127 | |||
128 | private function thenIsInstanceOf($expectedClass, $instance): void |
||
133 | |||
134 | private function thenIsexpecteedConfig(array $config): void |
||
143 | } |
||
144 |