Passed
Push — master ( 3b2524...0cacfc )
by Omid
01:24 queued 11s
created

Guzzle6Test::testHasGuzzle6Client()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MovingImage\Bundle\VMProApiBundle\Tests\DependencyInjection\VMProApiExtensionTest;
6
7
use MovingImage\Bundle\VMProApiBundle\DependencyInjection\VMProApiExtension;
8
use MovingImage\Bundle\VMProApiBundle\Tests\DependencyInjection\AbstractTestCase;
9
use MovingImage\Client\VMPro\ApiClient\Guzzle6ApiClient;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
12
class Guzzle6Test extends AbstractTestCase
13
{
14
    /**
15
     * Assert whether when Guzzle ^6.0 is installed, the right instance
16
     * of the API client is placed in the dependency injection container.
17
     */
18
    public function testHasGuzzle6Client(): void
19
    {
20
        $container = new ContainerBuilder();
21
        $loader = new VMProApiExtension();
22
        $config = $this->getFullConfig();
23
24
        $loader->load($config, $container);
25
26
        $this->assertInstanceOf(Guzzle6ApiClient::class, $container->get('vmpro_api.client'));
27
    }
28
}
29