Code Duplication    Length = 12-12 lines in 2 locations

eZ/Publish/Core/MVC/Symfony/Matcher/Tests/Block/MultipleValuedTest.php 1 location

@@ 20-31 (lines=12) @@
17
     * @covers \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig
18
     * @covers \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::getValues
19
     */
20
    public function testSetMatchingConfig($matchingConfig)
21
    {
22
        $matcher = $this->getMultipleValuedMatcherMock();
23
        $matcher->setMatchingConfig($matchingConfig);
24
        $values = $matcher->getValues();
25
        $this->assertInternalType('array', $values);
26
27
        $matchingConfig = is_array($matchingConfig) ? $matchingConfig : [$matchingConfig];
28
        foreach ($matchingConfig as $val) {
29
            $this->assertContains($val, $values);
30
        }
31
    }
32
33
    /**
34
     * Returns a set of matching values, either single or multiple.

eZ/Publish/Core/MVC/Symfony/Matcher/Tests/ContentBased/MultipleValuedTest.php 1 location

@@ 18-29 (lines=12) @@
15
     * @covers \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig
16
     * @covers \eZ\Publish\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::getValues
17
     */
18
    public function testSetMatchingConfig($matchingConfig)
19
    {
20
        $matcher = $this->getMultipleValuedMatcherMock();
21
        $matcher->setMatchingConfig($matchingConfig);
22
        $values = $matcher->getValues();
23
        $this->assertInternalType('array', $values);
24
25
        $matchingConfig = is_array($matchingConfig) ? $matchingConfig : [$matchingConfig];
26
        foreach ($matchingConfig as $val) {
27
            $this->assertContains($val, $values);
28
        }
29
    }
30
31
    /**
32
     * Returns a set of matching values, either single or multiple.