Code Duplication    Length = 18-18 lines in 4 locations

tests/DateInterval/ConstructTest.php 4 locations

@@ 92-109 (lines=18) @@
89
        $this->assertInterval($ci, 0, 3, 0, 0, 0, 0);
90
    }
91
92
    public function testWeeks()
93
    {
94
        $ci = new Interval(0, 0, 1);
95
        $this->assertInstanceOfInterval($ci);
96
        $this->assertInterval($ci, 0, 0, 7, 0, 0, 0);
97
98
        $ci = Interval::weeks(2);
99
        $this->assertInstanceOfInterval($ci);
100
        $this->assertInterval($ci, 0, 0, 14, 0, 0, 0);
101
102
        $ci = Interval::week();
103
        $this->assertInstanceOfInterval($ci);
104
        $this->assertInterval($ci, 0, 0, 7, 0, 0, 0);
105
106
        $ci = Interval::week(3);
107
        $this->assertInstanceOfInterval($ci);
108
        $this->assertInterval($ci, 0, 0, 21, 0, 0, 0);
109
    }
110
111
    public function testDays()
112
    {
@@ 134-151 (lines=18) @@
131
        $this->assertInterval($ci, 0, 0, 3, 0, 0, 0);
132
    }
133
134
    public function testHours()
135
    {
136
        $ci = new Interval(0, 0, 0, 0, 1);
137
        $this->assertInstanceOfInterval($ci);
138
        $this->assertInterval($ci, 0, 0, 0, 1, 0, 0);
139
140
        $ci = Interval::hours(2);
141
        $this->assertInstanceOfInterval($ci);
142
        $this->assertInterval($ci, 0, 0, 0, 2, 0, 0);
143
144
        $ci = Interval::hour();
145
        $this->assertInstanceOfInterval($ci);
146
        $this->assertInterval($ci, 0, 0, 0, 1, 0, 0);
147
148
        $ci = Interval::hour(3);
149
        $this->assertInstanceOfInterval($ci);
150
        $this->assertInterval($ci, 0, 0, 0, 3, 0, 0);
151
    }
152
153
    public function testMinutes()
154
    {
@@ 153-170 (lines=18) @@
150
        $this->assertInterval($ci, 0, 0, 0, 3, 0, 0);
151
    }
152
153
    public function testMinutes()
154
    {
155
        $ci = new Interval(0, 0, 0, 0, 0, 1);
156
        $this->assertInstanceOfInterval($ci);
157
        $this->assertInterval($ci, 0, 0, 0, 0, 1, 0);
158
159
        $ci = Interval::minutes(2);
160
        $this->assertInstanceOfInterval($ci);
161
        $this->assertInterval($ci, 0, 0, 0, 0, 2, 0);
162
163
        $ci = Interval::minute();
164
        $this->assertInstanceOfInterval($ci);
165
        $this->assertInterval($ci, 0, 0, 0, 0, 1, 0);
166
167
        $ci = Interval::minute(3);
168
        $this->assertInstanceOfInterval($ci);
169
        $this->assertInterval($ci, 0, 0, 0, 0, 3, 0);
170
    }
171
172
    public function testSeconds()
173
    {
@@ 172-189 (lines=18) @@
169
        $this->assertInterval($ci, 0, 0, 0, 0, 3, 0);
170
    }
171
172
    public function testSeconds()
173
    {
174
        $ci = new Interval(0, 0, 0, 0, 0, 0, 1);
175
        $this->assertInstanceOfInterval($ci);
176
        $this->assertInterval($ci, 0, 0, 0, 0, 0, 1);
177
178
        $ci = Interval::seconds(2);
179
        $this->assertInstanceOfInterval($ci);
180
        $this->assertInterval($ci, 0, 0, 0, 0, 0, 2);
181
182
        $ci = Interval::second();
183
        $this->assertInstanceOfInterval($ci);
184
        $this->assertInterval($ci, 0, 0, 0, 0, 0, 1);
185
186
        $ci = Interval::second(3);
187
        $this->assertInstanceOfInterval($ci);
188
        $this->assertInterval($ci, 0, 0, 0, 0, 0, 3);
189
    }
190
191
    public function testYearsAndHours()
192
    {