Code Duplication    Length = 36-39 lines in 5 locations

risoluto/lib/vendor_test/Risoluto/DateTest/DateTest4GenDay.php 5 locations

@@ 84-122 (lines=39) @@
81
     *
82
     * GenMonth()の挙動をテストする(引数1つ)
83
     */
84
    public function test_genDay_Args1()
85
    {
86
        $want = [
87
            '' => '',
88
            '01' => '01',
89
            '02' => '02',
90
            '03' => '03',
91
            '04' => '04',
92
            '05' => '05',
93
            '06' => '06',
94
            '07' => '07',
95
            '08' => '08',
96
            '09' => '09',
97
            '10' => '10',
98
            '11' => '11',
99
            '12' => '12',
100
            '13' => '13',
101
            '14' => '14',
102
            '15' => '15',
103
            '16' => '16',
104
            '17' => '17',
105
            '18' => '18',
106
            '19' => '19',
107
            '20' => '20',
108
            '21' => '21',
109
            '22' => '22',
110
            '23' => '23',
111
            '24' => '24',
112
            '25' => '25',
113
            '26' => '26',
114
            '27' => '27',
115
            '28' => '28',
116
            '29' => '29',
117
            '30' => '30',
118
            '31' => '31',
119
        ];
120
121
        $this->assertEquals( Date::genDay( true ), $want );
122
    }
123
124
    /**
125
     * test_genDay_Args2()
@@ 129-167 (lines=39) @@
126
     *
127
     * GenMonth()の挙動をテストする(引数2つ)
128
     */
129
    public function test_genDay_Args2()
130
    {
131
        $want = [
132
            '--' => '',
133
            '01' => '01',
134
            '02' => '02',
135
            '03' => '03',
136
            '04' => '04',
137
            '05' => '05',
138
            '06' => '06',
139
            '07' => '07',
140
            '08' => '08',
141
            '09' => '09',
142
            '10' => '10',
143
            '11' => '11',
144
            '12' => '12',
145
            '13' => '13',
146
            '14' => '14',
147
            '15' => '15',
148
            '16' => '16',
149
            '17' => '17',
150
            '18' => '18',
151
            '19' => '19',
152
            '20' => '20',
153
            '21' => '21',
154
            '22' => '22',
155
            '23' => '23',
156
            '24' => '24',
157
            '25' => '25',
158
            '26' => '26',
159
            '27' => '27',
160
            '28' => '28',
161
            '29' => '29',
162
            '30' => '30',
163
            '31' => '31',
164
        ];
165
166
        $this->assertEquals( Date::genDay( true, '--' ), $want );
167
    }
168
169
    /**
170
     * test_genDay_Args3()
@@ 174-212 (lines=39) @@
171
     *
172
     * GenMonth()の挙動をテストする(引数3つ)
173
     */
174
    public function test_genDay_Args3()
175
    {
176
        $want = [
177
            '--' => '--',
178
            '01' => '01',
179
            '02' => '02',
180
            '03' => '03',
181
            '04' => '04',
182
            '05' => '05',
183
            '06' => '06',
184
            '07' => '07',
185
            '08' => '08',
186
            '09' => '09',
187
            '10' => '10',
188
            '11' => '11',
189
            '12' => '12',
190
            '13' => '13',
191
            '14' => '14',
192
            '15' => '15',
193
            '16' => '16',
194
            '17' => '17',
195
            '18' => '18',
196
            '19' => '19',
197
            '20' => '20',
198
            '21' => '21',
199
            '22' => '22',
200
            '23' => '23',
201
            '24' => '24',
202
            '25' => '25',
203
            '26' => '26',
204
            '27' => '27',
205
            '28' => '28',
206
            '29' => '29',
207
            '30' => '30',
208
            '31' => '31',
209
        ];
210
211
        $this->assertEquals( Date::genDay( true, '--', '--' ), $want );
212
    }
213
214
    /**
215
     * test_genDay_Args4_January()
@@ 264-299 (lines=36) @@
261
     *
262
     * GenMonth()の挙動をテストする(引数4つ)
263
     */
264
    public function test_genDay_Args4_February()
265
    {
266
        $want = [
267
            '--' => '--',
268
            '01' => '01',
269
            '02' => '02',
270
            '03' => '03',
271
            '04' => '04',
272
            '05' => '05',
273
            '06' => '06',
274
            '07' => '07',
275
            '08' => '08',
276
            '09' => '09',
277
            '10' => '10',
278
            '11' => '11',
279
            '12' => '12',
280
            '13' => '13',
281
            '14' => '14',
282
            '15' => '15',
283
            '16' => '16',
284
            '17' => '17',
285
            '18' => '18',
286
            '19' => '19',
287
            '20' => '20',
288
            '21' => '21',
289
            '22' => '22',
290
            '23' => '23',
291
            '24' => '24',
292
            '25' => '25',
293
            '26' => '26',
294
            '27' => '27',
295
            '28' => '28',
296
        ];
297
298
        $this->assertEquals( Date::genDay( true, '--', '--', [ 'month' => 2, 'year' => '2014' ] ), $want );
299
    }
300
301
    /**
302
     * test_genDay_Args4_February_LY()
@@ 306-342 (lines=37) @@
303
     *
304
     * GenMonth()の挙動をテストする(引数4つ)
305
     */
306
    public function test_genDay_Args4_February_LY()
307
    {
308
        $want = [
309
            '--' => '--',
310
            '01' => '01',
311
            '02' => '02',
312
            '03' => '03',
313
            '04' => '04',
314
            '05' => '05',
315
            '06' => '06',
316
            '07' => '07',
317
            '08' => '08',
318
            '09' => '09',
319
            '10' => '10',
320
            '11' => '11',
321
            '12' => '12',
322
            '13' => '13',
323
            '14' => '14',
324
            '15' => '15',
325
            '16' => '16',
326
            '17' => '17',
327
            '18' => '18',
328
            '19' => '19',
329
            '20' => '20',
330
            '21' => '21',
331
            '22' => '22',
332
            '23' => '23',
333
            '24' => '24',
334
            '25' => '25',
335
            '26' => '26',
336
            '27' => '27',
337
            '28' => '28',
338
            '29' => '29',
339
        ];
340
341
        $this->assertEquals( Date::genDay( true, '--', '--', [ 'month' => 2, 'year' => '2012' ] ), $want );
342
    }
343
344
    /**
345
     * test_genDay_Args4_April()