AbstractTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 36
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEmptyConfig() 0 12 1
A getFullConfig() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MovingImage\Bundle\VMProApiBundle\Tests\DependencyInjection;
6
7
use PHPUnit\Framework\TestCase;
8
use Symfony\Component\Yaml\Parser;
9
10
abstract class AbstractTestCase extends TestCase
11
{
12
    /**
13
     * Get empty configuration set.
14
     */
15
    protected function getEmptyConfig(): array
16
    {
17
        $yaml = <<<'EOF'
18
vm_pro_api:
19
    credentials:
20
        username:  ~
21
        password:  ~
22
EOF;
23
        $parser = new Parser();
24
25
        return $parser->parse($yaml);
26
    }
27
28
    /**
29
     * Get empty configuration set.
30
     */
31
    protected function getFullConfig(): array
32
    {
33
        $yaml = <<<'EOF'
34
vm_pro_api:
35
    base_url:      http://google.com/
36
    default_vm_id: 5
37
    credentials:
38
        username:  [email protected]
39
        password:  test_password
40
EOF;
41
        $parser = new Parser();
42
43
        return $parser->parse($yaml);
44
    }
45
}
46