@@ 77-108 (lines=32) @@ | ||
74 | * |
|
75 | * GenHour()の挙動をテストする(引数1つ) |
|
76 | */ |
|
77 | public function test_GenHour_Args1() |
|
78 | { |
|
79 | $want = [ |
|
80 | '' => '', |
|
81 | '00' => '00', |
|
82 | '01' => '01', |
|
83 | '02' => '02', |
|
84 | '03' => '03', |
|
85 | '04' => '04', |
|
86 | '05' => '05', |
|
87 | '06' => '06', |
|
88 | '07' => '07', |
|
89 | '08' => '08', |
|
90 | '09' => '09', |
|
91 | '10' => '10', |
|
92 | '11' => '11', |
|
93 | '12' => '12', |
|
94 | '13' => '13', |
|
95 | '14' => '14', |
|
96 | '15' => '15', |
|
97 | '16' => '16', |
|
98 | '17' => '17', |
|
99 | '18' => '18', |
|
100 | '19' => '19', |
|
101 | '20' => '20', |
|
102 | '21' => '21', |
|
103 | '22' => '22', |
|
104 | '23' => '23', |
|
105 | ]; |
|
106 | ||
107 | $this->assertEquals( Date::genHour( true ), $want ); |
|
108 | } |
|
109 | ||
110 | /** |
|
111 | * test_GenHour_Args2() |
|
@@ 115-146 (lines=32) @@ | ||
112 | * |
|
113 | * GenHour()の挙動をテストする(引数2つ) |
|
114 | */ |
|
115 | public function test_GenHour_Args2() |
|
116 | { |
|
117 | $want = [ |
|
118 | '--' => '', |
|
119 | '00' => '00', |
|
120 | '01' => '01', |
|
121 | '02' => '02', |
|
122 | '03' => '03', |
|
123 | '04' => '04', |
|
124 | '05' => '05', |
|
125 | '06' => '06', |
|
126 | '07' => '07', |
|
127 | '08' => '08', |
|
128 | '09' => '09', |
|
129 | '10' => '10', |
|
130 | '11' => '11', |
|
131 | '12' => '12', |
|
132 | '13' => '13', |
|
133 | '14' => '14', |
|
134 | '15' => '15', |
|
135 | '16' => '16', |
|
136 | '17' => '17', |
|
137 | '18' => '18', |
|
138 | '19' => '19', |
|
139 | '20' => '20', |
|
140 | '21' => '21', |
|
141 | '22' => '22', |
|
142 | '23' => '23', |
|
143 | ]; |
|
144 | ||
145 | $this->assertEquals( Date::genHour( true, '--' ), $want ); |
|
146 | } |
|
147 | ||
148 | /** |
|
149 | * test_GenHour_Args3() |
|
@@ 153-184 (lines=32) @@ | ||
150 | * |
|
151 | * GenHour()の挙動をテストする(引数3つ) |
|
152 | */ |
|
153 | public function test_GenHour_Args3() |
|
154 | { |
|
155 | $want = [ |
|
156 | '--' => '--', |
|
157 | '00' => '00', |
|
158 | '01' => '01', |
|
159 | '02' => '02', |
|
160 | '03' => '03', |
|
161 | '04' => '04', |
|
162 | '05' => '05', |
|
163 | '06' => '06', |
|
164 | '07' => '07', |
|
165 | '08' => '08', |
|
166 | '09' => '09', |
|
167 | '10' => '10', |
|
168 | '11' => '11', |
|
169 | '12' => '12', |
|
170 | '13' => '13', |
|
171 | '14' => '14', |
|
172 | '15' => '15', |
|
173 | '16' => '16', |
|
174 | '17' => '17', |
|
175 | '18' => '18', |
|
176 | '19' => '19', |
|
177 | '20' => '20', |
|
178 | '21' => '21', |
|
179 | '22' => '22', |
|
180 | '23' => '23', |
|
181 | ]; |
|
182 | ||
183 | $this->assertEquals( Date::genHour( true, '--', '--' ), $want ); |
|
184 | } |
|
185 | ||
186 | /** |
|
187 | * test_GenHour_Args4() |
|
@@ 191-222 (lines=32) @@ | ||
188 | * |
|
189 | * GenHour()の挙動をテストする(引数4つ) |
|
190 | */ |
|
191 | public function test_GenHour_Args4() |
|
192 | { |
|
193 | $want = [ |
|
194 | '--' => '--', |
|
195 | '00' => '午前00', |
|
196 | '01' => '午前01', |
|
197 | '02' => '午前02', |
|
198 | '03' => '午前03', |
|
199 | '04' => '午前04', |
|
200 | '05' => '午前05', |
|
201 | '06' => '午前06', |
|
202 | '07' => '午前07', |
|
203 | '08' => '午前08', |
|
204 | '09' => '午前09', |
|
205 | '10' => '午前10', |
|
206 | '11' => '午前11', |
|
207 | '12' => '午後00', |
|
208 | '13' => '午後01', |
|
209 | '14' => '午後02', |
|
210 | '15' => '午後03', |
|
211 | '16' => '午後04', |
|
212 | '17' => '午後05', |
|
213 | '18' => '午後06', |
|
214 | '19' => '午後07', |
|
215 | '20' => '午後08', |
|
216 | '21' => '午後09', |
|
217 | '22' => '午後10', |
|
218 | '23' => '午後11', |
|
219 | ]; |
|
220 | ||
221 | $this->assertEquals( Date::genHour( true, '--', '--', false ), $want ); |
|
222 | } |
|
223 | } |