Completed
Branch unittests (a61d5f)
by Ruben
02:26
created

AbstractTestCase::getEmptyConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 12
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace MovingImage\Bundle\VMProApiBundle\Tests\DependencyInjection;
4
5
use Symfony\Component\Yaml\Parser;
6
7
abstract class AbstractTestCase extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * Get empty configuration set.
11
     *
12
     * @return array
13
     */
14
    protected function getEmptyConfig()
15
    {
16
        $yaml = <<<'EOF'
17
vm_pro_api:
18
    credentials:
19
        username:  ~
20
        password:  ~
21
EOF;
22
        $parser = new Parser();
23
24
        return $parser->parse($yaml);
25
    }
26
27
    /**
28
     * Get empty configuration set.
29
     *
30
     * @return array
31
     */
32
    protected function getFullConfig()
33
    {
34
        $yaml = <<<'EOF'
35
vm_pro_api:
36
    base_url:      http://google.com/
37
    default_vm_id: 5
38
    credentials:
39
        username:  [email protected]
40
        password:  test_password
41
EOF;
42
        $parser = new Parser();
43
44
        return $parser->parse($yaml);
45
    }
46
}
47