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

Guzzle6Test::setUp()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 2
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