Code Duplication    Length = 28-29 lines in 2 locations

tests/unit/Mathielen/ReportWriteEngine/Engine/CanvasTest.php 2 locations

@@ 53-80 (lines=28) @@
50
    /**
51
     * @dataProvider getInsertYData
52
     */
53
    public function testInsertY($y, $h, array $expectedData)
54
    {
55
        $from = [
56
            0 => [
57
                0 => 'A',
58
                1 => 'B',
59
                2 => 'C'
60
            ],
61
            1 => [
62
                0 => 'D',
63
                1 => 'E',
64
                2 => 'F'
65
            ]
66
        ];
67
        $from = new Canvas(null, $from);
68
69
        $to = [
70
            0 => [
71
                0 => 'X',
72
                1 => 'Y',
73
                2 => 'Z'
74
            ]
75
        ];
76
        $to = new Canvas(null, $to);
77
78
        $from->insert($to, $y, 0, $h, 0);
79
        $this->assertEquals($expectedData, $from->getArrayCopy());
80
    }
81
82
    public function getInsertYData()
83
    {
@@ 141-169 (lines=29) @@
138
    /**
139
     * @dataProvider getInsertXData
140
     */
141
    public function testInsertX($x, $w, array $expectedData)
142
    {
143
        $from = [
144
            0 => [
145
                0 => 'A',
146
                1 => 'B',
147
                2 => 'C'
148
            ],
149
            1 => [
150
                0 => 'D',
151
                1 => 'E',
152
                2 => 'F'
153
            ]
154
        ];
155
        $from = new Canvas(null, $from);
156
157
        $to = [
158
            0 => [
159
                0 => 'X',
160
                1 => 'Y',
161
                2 => 'Z'
162
            ]
163
        ];
164
        $to = new Canvas(null, $to);
165
166
        $from->insert($to, 0, $x, 0, $w);
167
168
        $this->assertEquals($expectedData, $from->getArrayCopy());
169
    }
170
171
    public function getInsertXData()
172
    {