StackableResolverTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 22 1
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