AbstractTestCase::getEmptyConfig()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
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;
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