@@ 135-148 (lines=14) @@ | ||
132 | * Assert whether when Guzzle ^5.0 is installed, the right instance |
|
133 | * of the API client is placed in the dependency injection container. |
|
134 | */ |
|
135 | public function testHasGuzzle5Client() |
|
136 | { |
|
137 | if (version_compare(ClientInterface::VERSION, '6.0', '>=')) { |
|
138 | $this->markTestSkipped('Skipping test when Guzzle ~6.0 is installed'); |
|
139 | } |
|
140 | ||
141 | $container = new ContainerBuilder(); |
|
142 | $loader = new VMProApiExtension(); |
|
143 | $config = $this->getFullConfig(); |
|
144 | ||
145 | $loader->load($config, $container); |
|
146 | ||
147 | $this->assertInstanceOf(Guzzle5ApiClient::class, $container->get('vmpro_api.client')); |
|
148 | } |
|
149 | ||
150 | /** |
|
151 | * Assert whether when Guzzle ^6.0 is installed, the right instance |
|
@@ 154-167 (lines=14) @@ | ||
151 | * Assert whether when Guzzle ^6.0 is installed, the right instance |
|
152 | * of the API client is placed in the dependency injection container. |
|
153 | */ |
|
154 | public function testHasGuzzle6Client() |
|
155 | { |
|
156 | if (version_compare(ClientInterface::VERSION, '6.0', '<')) { |
|
157 | $this->markTestSkipped('Skipping test when Guzzle ~5.0 is installed'); |
|
158 | } |
|
159 | ||
160 | $container = new ContainerBuilder(); |
|
161 | $loader = new VMProApiExtension(); |
|
162 | $config = $this->getFullConfig(); |
|
163 | ||
164 | $loader->load($config, $container); |
|
165 | ||
166 | $this->assertInstanceOf(Guzzle6ApiClient::class, $container->get('vmpro_api.client')); |
|
167 | } |
|
168 | } |
|
169 |