source: branches/version-2_11-dev/test/class/helper/SC_Helper_Purchase_Test.php @ 21016

Revision 21016, 13.7 KB checked in by habu, 10 years ago (diff)

#1394(会員住所以外のお届け先を指定しても情報が反映されない)

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