source: branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getShippingTempTest.php @ 22135

Revision 22135, 1.3 KB checked in by shift_hiroko.tamagawa, 9 years ago (diff)

DB操作の例を追加

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
5/**
6 *
7 */
8class SC_Helper_Purchase_getShippingTempTest extends SC_Helper_Purchase_TestBase {
9
10  protected function setUp() {
11    parent::setUp();
12  }
13
14  protected function tearDown() {
15    parent::tearDown();
16  }
17
18  /////////////////////////////////////////
19  public function testGetShippingTemp_保有フラグがOFFの場合_セッション情報を取得する() {
20    $this->setUpShipping($this->getMultipleShipping());
21
22    $this->expected = $this->getMultipleShipping();
23    $this->actual = SC_Helper_Purchase::getShippingTemp();
24
25    $this->verify('配送情報');
26  }
27
28  public function testGetShippingTemp_保有フラグがONの場合_商品のある情報のみ取得する() {
29    $this->setUpShipping($this->getMultipleShipping());
30
31    $this->expected = array(
32      '00001' => array(
33        'shipment_id' => '00001',
34        'shipment_item' => array('商品1'),
35        'shipping_pref' => '東京都'),
36      '00002' => array(
37        'shipment_id' => '00002',
38        'shipment_item' => array('商品2'),
39        'shipping_pref' => '沖縄県')
40    );
41    $this->actual = SC_Helper_Purchase::getShippingTemp(TRUE);
42
43    $this->verify('配送情報');
44  }
45
46}
47
Note: See TracBrowser for help on using the repository browser.