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

Revision 22135, 2.0 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_isAddPointTest 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 testIsAddPoint_新規注文の場合_FALSEが返る() {
20    $this->expected = FALSE;
21    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_NEW);
22
23    $this->verify('ポイント加算するかどうか');
24  }
25
26  public function testIsAddPoint_入金待ちの場合_FALSEが返る() {
27    $this->expected = FALSE;
28    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PAY_WAIT);
29
30    $this->verify('ポイント加算するかどうか');
31  }
32
33  public function testIsAddPoint_入金済みの場合_FALSEが返る() {
34    $this->expected = FALSE;
35    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PRE_END);
36
37    $this->verify('ポイント加算するかどうか');
38  }
39
40  public function testIsAddPoint_キャンセルの場合_FALSEが返る() {
41    $this->expected = FALSE;
42    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_CANCEL);
43
44    $this->verify('ポイント加算するかどうか');
45  }
46
47  public function testIsAddPoint_取り寄せ中の場合_FALSEが返る() {
48    $this->expected = FALSE;
49    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_BACK_ORDER);
50
51    $this->verify('ポイント加算するかどうか');
52  }
53
54  public function testIsAddPoint_発送済みの場合_TRUEが返る() {
55    $this->expected = TRUE;
56    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_DELIV);
57
58    $this->verify('ポイント加算するかどうか');
59  }
60
61  public function testIsAddPoint_その他の場合_FALSEが返る() {
62    $this->expected = FALSE;
63    $this->actual = SC_Helper_Purchase::isAddPoint(ORDER_PENDING);
64
65    $this->verify('ポイント加算するかどうか');
66  }
67
68}
69
Note: See TracBrowser for help on using the repository browser.