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

Revision 22128, 966 bytes 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_unsetShippingTempTest extends SC_Helper_Purchase_BaseTest {
9
10  protected function setUp() {
11    parent::setUp();
12
13    // 空にするだけなので適当な値を設定
14    $_SESSION['shipping'] = 'temp01';
15    $_SESSION['multiple_temp'] = 'temp02';
16  }
17
18  protected function tearDown() {
19    parent::tearDown();
20  }
21
22  /////////////////////////////////////////
23  public function testUnsetShippingTemp__配送情報がすべて破棄される() {
24    SC_Helper_Purchase::unsetShippingTemp(TRUE);
25
26    $this->expected = array('shipping'=>TRUE, 'multiple_temp'=>TRUE);
27    $this->actual['shipping'] = empty($_SESSION['shipping']);
28    $this->actual['multiple_temp'] = empty($_SESSION['multiple_temp']);
29
30    $this->verify('セッション情報が空かどうか');
31  }
32
33}
34
Note: See TracBrowser for help on using the repository browser.