Code Duplication    Length = 12-12 lines in 2 locations

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

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

eZ/Publish/Core/MVC/Symfony/Matcher/Tests/ContentBased/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.