Code Duplication    Length = 22-23 lines in 5 locations

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterHostElementTest.php 1 location

@@ 34-56 (lines=23) @@
31
        $this->matcherBuilder = new MatcherBuilder();
32
    }
33
34
    public function testConstruct()
35
    {
36
        return new Router(
37
            $this->matcherBuilder,
38
            $this->getMock('Psr\\Log\\LoggerInterface'),
39
            'default_sa',
40
            array(
41
                'HostElement' => array(
42
                    'value' => 2,
43
                ),
44
                'Map\\URI' => array(
45
                    'first_sa' => 'first_sa',
46
                    'second_sa' => 'second_sa',
47
                ),
48
                'Map\\Host' => array(
49
                    'first_sa' => 'first_sa',
50
                    'first_siteaccess' => 'first_sa',
51
                    'second_sa' => 'second_sa',
52
                ),
53
            ),
54
            array('first_sa', 'second_sa', 'third_sa', 'fourth_sa', 'fifth_sa', 'example')
55
        );
56
    }
57
58
    /**
59
     * @depends testConstruct

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterHostTextTest.php 1 location

@@ 32-54 (lines=23) @@
29
        $this->matcherBuilder = new MatcherBuilder();
30
    }
31
32
    public function testConstruct()
33
    {
34
        return new Router(
35
            $this->matcherBuilder,
36
            $this->getMock('Psr\\Log\\LoggerInterface'),
37
            'default_sa',
38
            array(
39
                'HostText' => array(
40
                    'prefix' => 'www.',
41
                    'suffix' => '.com',
42
                ),
43
                'Map\\URI' => array(
44
                    'first_sa' => 'first_sa',
45
                    'second_sa' => 'second_sa',
46
                ),
47
                'Map\\Host' => array(
48
                    'first_sa' => 'first_sa',
49
                    'first_siteaccess' => 'first_sa',
50
                ),
51
            ),
52
            array('first_sa', 'second_sa', 'third_sa', 'fourth_sa', 'fifth_sa', 'example')
53
        );
54
    }
55
56
    /**
57
     * @depends testConstruct

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterURIElement2Test.php 1 location

@@ 33-54 (lines=22) @@
30
        $this->matcherBuilder = new MatcherBuilder();
31
    }
32
33
    public function testConstruct()
34
    {
35
        return new Router(
36
            $this->matcherBuilder,
37
            $this->getMock('Psr\\Log\\LoggerInterface'),
38
            'default_sa',
39
            array(
40
                'URIElement' => array(
41
                    'value' => 2,
42
                ),
43
                'Map\\URI' => array(
44
                    'first_sa' => 'first_sa',
45
                    'second_sa' => 'second_sa',
46
                ),
47
                'Map\\Host' => array(
48
                    'first_sa' => 'first_sa',
49
                    'first_siteaccess' => 'first_sa',
50
                ),
51
            ),
52
            array('first_sa', 'second_sa', 'third_sa', 'fourth_sa', 'fifth_sa', 'foo_baz', 'test_foo', 'first_sa_foo', 'second_sa_foo')
53
        );
54
    }
55
56
    /**
57
     * @depends testConstruct

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterURIElementTest.php 1 location

@@ 33-54 (lines=22) @@
30
        $this->matcherBuilder = new MatcherBuilder();
31
    }
32
33
    public function testConstruct()
34
    {
35
        return new Router(
36
            $this->matcherBuilder,
37
            $this->getMock('Psr\\Log\\LoggerInterface'),
38
            'default_sa',
39
            array(
40
                'URIElement' => array(
41
                    'value' => 1,
42
                ),
43
                'Map\\URI' => array(
44
                    'first_sa' => 'first_sa',
45
                    'second_sa' => 'second_sa',
46
                ),
47
                'Map\\Host' => array(
48
                    'first_sa' => 'first_sa',
49
                    'first_siteaccess' => 'first_sa',
50
                ),
51
            ),
52
            array('first_sa', 'second_sa', 'first_siteaccess', 'first_salt', 'first_sa.foo', 'test', 'foo')
53
        );
54
    }
55
56
    /**
57
     * @depends testConstruct

eZ/Publish/Core/MVC/Symfony/SiteAccess/Tests/RouterURITextTest.php 1 location

@@ 32-54 (lines=23) @@
29
        $this->matcherBuilder = new MatcherBuilder();
30
    }
31
32
    public function testConstruct()
33
    {
34
        return new Router(
35
            $this->matcherBuilder,
36
            $this->getMock('Psr\\Log\\LoggerInterface'),
37
            'default_sa',
38
            array(
39
                'URIText' => array(
40
                    'prefix' => 'foo',
41
                    'suffix' => 'bar',
42
                ),
43
                'Map\\URI' => array(
44
                    'first_sa' => 'first_sa',
45
                    'second_sa' => 'second_sa',
46
                ),
47
                'Map\\Host' => array(
48
                    'first_sa' => 'first_sa',
49
                    'first_siteaccess' => 'first_sa',
50
                ),
51
            ),
52
            array('first_sa', 'second_sa', 'third_sa', 'fourth_sa', 'fifth_sa', 'test')
53
        );
54
    }
55
56
    /**
57
     * @depends testConstruct