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

Revision 22128, 1.2 KB checked in by shift_hiroko.tamagawa, 9 years ago (diff)

単体テスト用基盤クラスと一部テストコードを追加

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_BaseTest.php");
5/**
6 *
7 */
8class SC_Helper_Purchase_getShippingPrefTest extends SC_Helper_Purchase_BaseTest {
9
10  protected function setUp() {
11    parent::setUp();
12  }
13
14  protected function tearDown() {
15    parent::tearDown();
16  }
17
18  /////////////////////////////////////////
19  // TODO 要確認:引数の名前がおかしい(is_multipleではないはず)
20  public function testGetShippingPref_保有フラグがOFFの場合_全配送情報を取得する() {
21    $this->setUpShipping($this->getMultipleShipping());
22
23    $this->expected = array('東京都', '沖縄県', '埼玉県');
24    $this->actual = SC_Helper_Purchase::getShippingPref();
25
26    $this->verify('配送先の都道府県');
27  }
28
29  public function testGetShippingPref_保有フラグがONの場合_商品のある配送情報のみ取得する() {
30    $this->setUpShipping($this->getMultipleShipping());
31
32    $this->expected = array('東京都', '沖縄県');
33    $this->actual = SC_Helper_Purchase::getShippingPref(TRUE);
34
35    $this->verify('配送先の都道府県');
36  }
37
38}
39
Note: See TracBrowser for help on using the repository browser.