Passed
Push — master ( d7fd0c...0cd2cd )
by Sam
04:33
created

StackableResolverTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nc 1
nop 0
dl 0
loc 22
rs 9.7998
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of PHP DNS Server.
5
 *
6
 * (c) Yif Swery <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace yswery\DNS\Tests\Resolver;
13
14
use yswery\DNS\Resolver\JsonResolver;
15
use yswery\DNS\Resolver\StackableResolver;
16
use yswery\DNS\Resolver\XmlResolver;
17
use yswery\DNS\Resolver\YamlResolver;
18
19
class StackableResolverTest extends AbstractResolverTest
20
{
21
    /**
22
     * @throws \Exception
23
     */
24
    public function setUp()
25
    {
26
        $jsonFiles = [
27
            __DIR__.'/../Resources/example.com.json',
28
            __DIR__.'/../Resources/test_records.json',
29
        ];
30
31
        $xmlFiles = [
32
            __DIR__.'/../Resources/example.com.xml',
33
            __DIR__.'/../Resources/test.com.xml',
34
            __DIR__.'/../Resources/test2.com.xml',
35
        ];
36
37
        $ymlFiles = [
38
            __DIR__.'/../Resources/records.yml',
39
            __DIR__.'/../Resources/example.com.yml',
40
        ];
41
42
        $this->resolver = new StackableResolver([
43
            new JsonResolver($jsonFiles),
44
            new XmlResolver($xmlFiles),
45
            new YamlResolver($ymlFiles),
46
        ]);
47
    }
48
}
49