Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 77-92 (lines=16) @@
74
    /**
75
     * @depends testConstruct
76
     */
77
    public function testSetMatcherBuilder(Compound $compoundMatcher)
78
    {
79
        $this
80
            ->matcherBuilder
81
            ->expects($this->any())
82
            ->method('buildMatcher')
83
            ->will($this->returnValue($this->createMock(Matcher::class)));
84
85
        $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class));
86
        $compoundMatcher->setMatcherBuilder($this->matcherBuilder);
87
        $matchers = $compoundMatcher->getSubMatchers();
88
        $this->assertInternalType('array', $matchers);
89
        foreach ($matchers as $matcher) {
90
            $this->assertInstanceOf(Matcher::class, $matcher);
91
        }
92
    }
93
94
    /**
95
     * @dataProvider matchProvider

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

@@ 70-84 (lines=15) @@
67
    /**
68
     * @depends testConstruct
69
     */
70
    public function testSetMatcherBuilder(Compound $compoundMatcher)
71
    {
72
        $this->matcherBuilder
73
            ->expects($this->any())
74
            ->method('buildMatcher')
75
            ->will($this->returnValue($this->createMock(Matcher::class)));
76
77
        $compoundMatcher->setRequest($this->createMock(SimplifiedRequest::class));
78
        $compoundMatcher->setMatcherBuilder($this->matcherBuilder);
79
        $matchers = $compoundMatcher->getSubMatchers();
80
        $this->assertInternalType('array', $matchers);
81
        foreach ($matchers as $matcher) {
82
            $this->assertInstanceOf(Matcher::class, $matcher);
83
        }
84
    }
85
86
    /**
87
     * @dataProvider matchProvider