Code Duplication    Length = 17-18 lines in 2 locations

tests/PhpSpreadsheetTests/Chart/LegendTest.php 2 locations

@@ 9-25 (lines=17) @@
6
7
class LegendTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testSetPosition()
10
    {
11
        $positionValues = [
12
            Legend::POSITION_RIGHT,
13
            Legend::POSITION_LEFT,
14
            Legend::POSITION_TOP,
15
            Legend::POSITION_BOTTOM,
16
            Legend::POSITION_TOPRIGHT,
17
        ];
18
19
        $testInstance = new Legend();
20
21
        foreach ($positionValues as $positionValue) {
22
            $result = $testInstance->setPosition($positionValue);
23
            $this->assertTrue($result);
24
        }
25
    }
26
27
    public function testSetInvalidPositionReturnsFalse()
28
    {
@@ 49-66 (lines=18) @@
46
        $this->assertEquals($PositionValue, $result);
47
    }
48
49
    public function testSetPositionXL()
50
    {
51
        $positionValues = [
52
            Legend::XL_LEGEND_POSITION_BOTTOM,
53
            Legend::XL_LEGEND_POSITION_CORNER,
54
            Legend::XL_LEGEND_POSITION_CUSTOM,
55
            Legend::XL_LEGEND_POSITION_LEFT,
56
            Legend::XL_LEGEND_POSITION_RIGHT,
57
            Legend::XL_LEGEND_POSITION_TOP,
58
        ];
59
60
        $testInstance = new Legend();
61
62
        foreach ($positionValues as $positionValue) {
63
            $result = $testInstance->setPositionXL($positionValue);
64
            $this->assertTrue($result);
65
        }
66
    }
67
68
    public function testSetInvalidXLPositionReturnsFalse()
69
    {