1 | <?php |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved. |
---|
6 | * |
---|
7 | * http://www.lockon.co.jp/ |
---|
8 | * |
---|
9 | * This program is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License |
---|
11 | * as published by the Free Software Foundation; either version 2 |
---|
12 | * of the License, or (at your option) any later version. |
---|
13 | * |
---|
14 | * This program is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this program; if not, write to the Free Software |
---|
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | |
---|
24 | // {{{ requires |
---|
25 | require_once(realpath(dirname(__FILE__)) . "/../../require.php"); |
---|
26 | require_once(realpath(dirname(__FILE__)) . "/../../../data/class_extends/helper_extends/SC_Helper_Purchase_Ex.php"); |
---|
27 | |
---|
28 | /** |
---|
29 | * SC_Helper_Purchase のテストケース. |
---|
30 | * |
---|
31 | * @package Helper |
---|
32 | * @author LOCKON CO.,LTD. |
---|
33 | * @version $Id$ |
---|
34 | */ |
---|
35 | class SC_Helper_Purchase_Test extends PHPUnit_Framework_TestCase |
---|
36 | { |
---|
37 | /** |
---|
38 | * @var SC_Helper_Purchase |
---|
39 | */ |
---|
40 | protected $object; |
---|
41 | |
---|
42 | /** |
---|
43 | * Sets up the fixture, for example, opens a network connection. |
---|
44 | * This method is called before a test is executed. |
---|
45 | */ |
---|
46 | protected function setUp() |
---|
47 | { |
---|
48 | $this->object = new SC_Helper_Purchase; |
---|
49 | } |
---|
50 | |
---|
51 | /** |
---|
52 | * Tears down the fixture, for example, closes a network connection. |
---|
53 | * This method is called after a test is executed. |
---|
54 | */ |
---|
55 | protected function tearDown() |
---|
56 | { |
---|
57 | } |
---|
58 | |
---|
59 | /** |
---|
60 | * @todo Implement testCompleteOrder(). |
---|
61 | */ |
---|
62 | public function testCompleteOrder() |
---|
63 | { |
---|
64 | // Remove the following lines when you implement this test. |
---|
65 | $this->markTestIncomplete( |
---|
66 | 'This test has not been implemented yet.' |
---|
67 | ); |
---|
68 | } |
---|
69 | |
---|
70 | /** |
---|
71 | * @todo Implement testCancelOrder(). |
---|
72 | */ |
---|
73 | public function testCancelOrder() |
---|
74 | { |
---|
75 | // Remove the following lines when you implement this test. |
---|
76 | $this->markTestIncomplete( |
---|
77 | 'This test has not been implemented yet.' |
---|
78 | ); |
---|
79 | } |
---|
80 | |
---|
81 | /** |
---|
82 | * @todo Implement testRollbackOrder(). |
---|
83 | */ |
---|
84 | public function testRollbackOrder() |
---|
85 | { |
---|
86 | // Remove the following lines when you implement this test. |
---|
87 | $this->markTestIncomplete( |
---|
88 | 'This test has not been implemented yet.' |
---|
89 | ); |
---|
90 | } |
---|
91 | |
---|
92 | /** |
---|
93 | * @todo Implement testVerifyChangeCart(). |
---|
94 | */ |
---|
95 | public function testVerifyChangeCart() |
---|
96 | { |
---|
97 | // Remove the following lines when you implement this test. |
---|
98 | $this->markTestIncomplete( |
---|
99 | 'This test has not been implemented yet.' |
---|
100 | ); |
---|
101 | } |
---|
102 | |
---|
103 | /** |
---|
104 | * @todo Implement testGetOrderTemp(). |
---|
105 | */ |
---|
106 | public function testGetOrderTemp() |
---|
107 | { |
---|
108 | // Remove the following lines when you implement this test. |
---|
109 | $this->markTestIncomplete( |
---|
110 | 'This test has not been implemented yet.' |
---|
111 | ); |
---|
112 | } |
---|
113 | |
---|
114 | /** |
---|
115 | * @todo Implement testGetOrderTempByOrderId(). |
---|
116 | */ |
---|
117 | public function testGetOrderTempByOrderId() |
---|
118 | { |
---|
119 | // Remove the following lines when you implement this test. |
---|
120 | $this->markTestIncomplete( |
---|
121 | 'This test has not been implemented yet.' |
---|
122 | ); |
---|
123 | } |
---|
124 | |
---|
125 | /** |
---|
126 | * @todo Implement testSaveOrderTemp(). |
---|
127 | */ |
---|
128 | public function testSaveOrderTemp() |
---|
129 | { |
---|
130 | // Remove the following lines when you implement this test. |
---|
131 | $this->markTestIncomplete( |
---|
132 | 'This test has not been implemented yet.' |
---|
133 | ); |
---|
134 | } |
---|
135 | |
---|
136 | /** |
---|
137 | * getShippingTemp() のテストケース. |
---|
138 | */ |
---|
139 | public function testGetShippingTemp() |
---|
140 | { |
---|
141 | $_SESSION['shipping'] = array( |
---|
142 | '0' => array('shipping_name01' => 'test01', 'shipment_item' => array('10' => array('shipment_item' => 0) ) ), |
---|
143 | '1' => array('shipping_name01' => 'test02'), |
---|
144 | '2' => array('shipping_name01' => 'test03', 'shipment_item' => array('11' => array('shipment_item' => 1) ) ), |
---|
145 | '3' => array('shipping_name01' => 'test04', 'shipment_item' => array('12' => array('shipment_item' => 2) ) ), |
---|
146 | ); |
---|
147 | |
---|
148 | // 第一引数(複数お届け先フラグ)がfalseの場合、$_SESSION['shipping']をそのまま返す |
---|
149 | $result = SC_Helper_Purchase_Ex::getShippingTemp(false); |
---|
150 | $this->assertEquals($result, $_SESSION['shipping']); |
---|
151 | |
---|
152 | // 第一引数(複数お届け先フラグ)がtrueの場合、実際に配送で利用されるお届け先の情報のみを入れたデータを返す |
---|
153 | $result = SC_Helper_Purchase_Ex::getShippingTemp(true); |
---|
154 | $this->assertEquals(false, $result === $_SESSION['shipping']); |
---|
155 | $this->assertEquals(false, $result == $_SESSION['shipping']); |
---|
156 | $this->assertEquals(3, count($result)); |
---|
157 | |
---|
158 | unset($_SESSION['shipping']); |
---|
159 | } |
---|
160 | |
---|
161 | /** |
---|
162 | * @todo Implement testClearShipmentItemTemp(). |
---|
163 | */ |
---|
164 | public function testClearShipmentItemTemp() |
---|
165 | { |
---|
166 | // Remove the following lines when you implement this test. |
---|
167 | $this->markTestIncomplete( |
---|
168 | 'This test has not been implemented yet.' |
---|
169 | ); |
---|
170 | } |
---|
171 | |
---|
172 | /** |
---|
173 | * @todo Implement testSetShipmentItemTemp(). |
---|
174 | */ |
---|
175 | public function testSetShipmentItemTemp() |
---|
176 | { |
---|
177 | // Remove the following lines when you implement this test. |
---|
178 | $this->markTestIncomplete( |
---|
179 | 'This test has not been implemented yet.' |
---|
180 | ); |
---|
181 | } |
---|
182 | |
---|
183 | /** |
---|
184 | * @todo Implement testGetShippingPref(). |
---|
185 | */ |
---|
186 | public function testGetShippingPref() |
---|
187 | { |
---|
188 | // Remove the following lines when you implement this test. |
---|
189 | $this->markTestIncomplete( |
---|
190 | 'This test has not been implemented yet.' |
---|
191 | ); |
---|
192 | } |
---|
193 | |
---|
194 | /** |
---|
195 | * @todo Implement testIsMultiple(). |
---|
196 | */ |
---|
197 | public function testIsMultiple() |
---|
198 | { |
---|
199 | // Remove the following lines when you implement this test. |
---|
200 | $this->markTestIncomplete( |
---|
201 | 'This test has not been implemented yet.' |
---|
202 | ); |
---|
203 | } |
---|
204 | |
---|
205 | /** |
---|
206 | * @todo Implement testSaveShippingTemp(). |
---|
207 | */ |
---|
208 | public function testSaveShippingTemp() |
---|
209 | { |
---|
210 | // Remove the following lines when you implement this test. |
---|
211 | $this->markTestIncomplete( |
---|
212 | 'This test has not been implemented yet.' |
---|
213 | ); |
---|
214 | } |
---|
215 | |
---|
216 | /** |
---|
217 | * @todo Implement testUnsetShippingTemp(). |
---|
218 | */ |
---|
219 | public function testUnsetShippingTemp() |
---|
220 | { |
---|
221 | // Remove the following lines when you implement this test. |
---|
222 | $this->markTestIncomplete( |
---|
223 | 'This test has not been implemented yet.' |
---|
224 | ); |
---|
225 | } |
---|
226 | |
---|
227 | /** |
---|
228 | * @todo Implement testCopyFromCustomer(). |
---|
229 | */ |
---|
230 | public function testCopyFromCustomer() |
---|
231 | { |
---|
232 | // Remove the following lines when you implement this test. |
---|
233 | $this->markTestIncomplete( |
---|
234 | 'This test has not been implemented yet.' |
---|
235 | ); |
---|
236 | } |
---|
237 | |
---|
238 | /** |
---|
239 | * @todo Implement testCopyFromOrder(). |
---|
240 | */ |
---|
241 | public function testCopyFromOrder() |
---|
242 | { |
---|
243 | // Remove the following lines when you implement this test. |
---|
244 | $this->markTestIncomplete( |
---|
245 | 'This test has not been implemented yet.' |
---|
246 | ); |
---|
247 | } |
---|
248 | |
---|
249 | /** |
---|
250 | * @todo Implement testGetPaymentsByPrice(). |
---|
251 | */ |
---|
252 | public function testGetPaymentsByPrice() |
---|
253 | { |
---|
254 | // Remove the following lines when you implement this test. |
---|
255 | $this->markTestIncomplete( |
---|
256 | 'This test has not been implemented yet.' |
---|
257 | ); |
---|
258 | } |
---|
259 | |
---|
260 | /** |
---|
261 | * @todo Implement testGetDelivDate(). |
---|
262 | */ |
---|
263 | public function testGetDelivDate() |
---|
264 | { |
---|
265 | // Remove the following lines when you implement this test. |
---|
266 | $this->markTestIncomplete( |
---|
267 | 'This test has not been implemented yet.' |
---|
268 | ); |
---|
269 | } |
---|
270 | |
---|
271 | /** |
---|
272 | * @todo Implement testGetDateArray(). |
---|
273 | */ |
---|
274 | public function testGetDateArray() |
---|
275 | { |
---|
276 | // Remove the following lines when you implement this test. |
---|
277 | $this->markTestIncomplete( |
---|
278 | 'This test has not been implemented yet.' |
---|
279 | ); |
---|
280 | } |
---|
281 | |
---|
282 | /** |
---|
283 | * @todo Implement testGetDelivTime(). |
---|
284 | */ |
---|
285 | public function testGetDelivTime() |
---|
286 | { |
---|
287 | // Remove the following lines when you implement this test. |
---|
288 | $this->markTestIncomplete( |
---|
289 | 'This test has not been implemented yet.' |
---|
290 | ); |
---|
291 | } |
---|
292 | |
---|
293 | /** |
---|
294 | * @todo Implement testGetDeliv(). |
---|
295 | */ |
---|
296 | public function testGetDeliv() |
---|
297 | { |
---|
298 | // Remove the following lines when you implement this test. |
---|
299 | $this->markTestIncomplete( |
---|
300 | 'This test has not been implemented yet.' |
---|
301 | ); |
---|
302 | } |
---|
303 | |
---|
304 | /** |
---|
305 | * @todo Implement testGetPayments(). |
---|
306 | */ |
---|
307 | public function testGetPayments() |
---|
308 | { |
---|
309 | // Remove the following lines when you implement this test. |
---|
310 | $this->markTestIncomplete( |
---|
311 | 'This test has not been implemented yet.' |
---|
312 | ); |
---|
313 | } |
---|
314 | |
---|
315 | /** |
---|
316 | * @todo Implement testRegisterShipping(). |
---|
317 | */ |
---|
318 | public function testRegisterShipping() |
---|
319 | { |
---|
320 | // Remove the following lines when you implement this test. |
---|
321 | $this->markTestIncomplete( |
---|
322 | 'This test has not been implemented yet.' |
---|
323 | ); |
---|
324 | } |
---|
325 | |
---|
326 | /** |
---|
327 | * @todo Implement testRegisterShipmentItem(). |
---|
328 | */ |
---|
329 | public function testRegisterShipmentItem() |
---|
330 | { |
---|
331 | // Remove the following lines when you implement this test. |
---|
332 | $this->markTestIncomplete( |
---|
333 | 'This test has not been implemented yet.' |
---|
334 | ); |
---|
335 | } |
---|
336 | |
---|
337 | /** |
---|
338 | * @todo Implement testRegisterOrderComplete(). |
---|
339 | */ |
---|
340 | public function testRegisterOrderComplete() |
---|
341 | { |
---|
342 | // Remove the following lines when you implement this test. |
---|
343 | $this->markTestIncomplete( |
---|
344 | 'This test has not been implemented yet.' |
---|
345 | ); |
---|
346 | } |
---|
347 | |
---|
348 | /** |
---|
349 | * @todo Implement testRegisterOrder(). |
---|
350 | */ |
---|
351 | public function testRegisterOrder() |
---|
352 | { |
---|
353 | // Remove the following lines when you implement this test. |
---|
354 | $this->markTestIncomplete( |
---|
355 | 'This test has not been implemented yet.' |
---|
356 | ); |
---|
357 | } |
---|
358 | |
---|
359 | /** |
---|
360 | * @todo Implement testRegisterOrderDetail(). |
---|
361 | */ |
---|
362 | public function testRegisterOrderDetail() |
---|
363 | { |
---|
364 | // Remove the following lines when you implement this test. |
---|
365 | $this->markTestIncomplete( |
---|
366 | 'This test has not been implemented yet.' |
---|
367 | ); |
---|
368 | } |
---|
369 | |
---|
370 | /** |
---|
371 | * @todo Implement testGetOrder(). |
---|
372 | */ |
---|
373 | public function testGetOrder() |
---|
374 | { |
---|
375 | // Remove the following lines when you implement this test. |
---|
376 | $this->markTestIncomplete( |
---|
377 | 'This test has not been implemented yet.' |
---|
378 | ); |
---|
379 | } |
---|
380 | |
---|
381 | /** |
---|
382 | * @todo Implement testGetOrderDetail(). |
---|
383 | */ |
---|
384 | public function testGetOrderDetail() |
---|
385 | { |
---|
386 | // Remove the following lines when you implement this test. |
---|
387 | $this->markTestIncomplete( |
---|
388 | 'This test has not been implemented yet.' |
---|
389 | ); |
---|
390 | } |
---|
391 | |
---|
392 | /** |
---|
393 | * @todo Implement testSetDownloadableFlgTo(). |
---|
394 | */ |
---|
395 | public function testSetDownloadableFlgTo() |
---|
396 | { |
---|
397 | // Remove the following lines when you implement this test. |
---|
398 | $this->markTestIncomplete( |
---|
399 | 'This test has not been implemented yet.' |
---|
400 | ); |
---|
401 | } |
---|
402 | |
---|
403 | /** |
---|
404 | * @todo Implement testGetShippings(). |
---|
405 | */ |
---|
406 | public function testGetShippings() |
---|
407 | { |
---|
408 | // Remove the following lines when you implement this test. |
---|
409 | $this->markTestIncomplete( |
---|
410 | 'This test has not been implemented yet.' |
---|
411 | ); |
---|
412 | } |
---|
413 | |
---|
414 | /** |
---|
415 | * @todo Implement testGetShipmentItems(). |
---|
416 | */ |
---|
417 | public function testGetShipmentItems() |
---|
418 | { |
---|
419 | // Remove the following lines when you implement this test. |
---|
420 | $this->markTestIncomplete( |
---|
421 | 'This test has not been implemented yet.' |
---|
422 | ); |
---|
423 | } |
---|
424 | |
---|
425 | /** |
---|
426 | * @todo Implement testSendOrderMail(). |
---|
427 | */ |
---|
428 | public function testSendOrderMail() |
---|
429 | { |
---|
430 | // Remove the following lines when you implement this test. |
---|
431 | $this->markTestIncomplete( |
---|
432 | 'This test has not been implemented yet.' |
---|
433 | ); |
---|
434 | } |
---|
435 | |
---|
436 | /** |
---|
437 | * @todo Implement testSfUpdateOrderStatus(). |
---|
438 | */ |
---|
439 | public function testSfUpdateOrderStatus() |
---|
440 | { |
---|
441 | // Remove the following lines when you implement this test. |
---|
442 | $this->markTestIncomplete( |
---|
443 | 'This test has not been implemented yet.' |
---|
444 | ); |
---|
445 | } |
---|
446 | |
---|
447 | /** |
---|
448 | * @todo Implement testSfUpdateOrderNameCol(). |
---|
449 | */ |
---|
450 | public function testSfUpdateOrderNameCol() |
---|
451 | { |
---|
452 | // Remove the following lines when you implement this test. |
---|
453 | $this->markTestIncomplete( |
---|
454 | 'This test has not been implemented yet.' |
---|
455 | ); |
---|
456 | } |
---|
457 | |
---|
458 | /** |
---|
459 | * @todo Implement testIsUsePoint(). |
---|
460 | */ |
---|
461 | public function testIsUsePoint() |
---|
462 | { |
---|
463 | // Remove the following lines when you implement this test. |
---|
464 | $this->markTestIncomplete( |
---|
465 | 'This test has not been implemented yet.' |
---|
466 | ); |
---|
467 | } |
---|
468 | |
---|
469 | /** |
---|
470 | * @todo Implement testIsAddPoint(). |
---|
471 | */ |
---|
472 | public function testIsAddPoint() |
---|
473 | { |
---|
474 | // Remove the following lines when you implement this test. |
---|
475 | $this->markTestIncomplete( |
---|
476 | 'This test has not been implemented yet.' |
---|
477 | ); |
---|
478 | } |
---|
479 | |
---|
480 | /** |
---|
481 | * @todo Implement testCleanupSession(). |
---|
482 | */ |
---|
483 | public function testCleanupSession() |
---|
484 | { |
---|
485 | // Remove the following lines when you implement this test. |
---|
486 | $this->markTestIncomplete( |
---|
487 | 'This test has not been implemented yet.' |
---|
488 | ); |
---|
489 | } |
---|
490 | } |
---|
491 | ?> |
---|