Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | $HOME = realpath(dirname(__FILE__)) . "/../../../.."; |
---|
4 | require_once($HOME . "/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php"); |
---|
5 | /** |
---|
6 | * |
---|
7 | */ |
---|
8 | class SC_Helper_Address_getListTest extends SC_Helper_Address_TestBase |
---|
9 | { |
---|
10 | |
---|
11 | protected function setUp() |
---|
12 | { |
---|
13 | parent::setUp(); |
---|
14 | $this->objAddress = new SC_Helper_Address_Ex(); |
---|
15 | } |
---|
16 | |
---|
17 | protected function tearUp() |
---|
18 | { |
---|
19 | parent::tearUp(); |
---|
20 | } |
---|
21 | |
---|
22 | ///////////////////////////////////////// |
---|
23 | public function testgetListTest_会員が該当テーブルに存在するかつstart_idが指定されている場合_配送先のarrayを返す() |
---|
24 | { |
---|
25 | $this->setUpAddress(); |
---|
26 | $customer_id = '1'; |
---|
27 | $startno = '1'; |
---|
28 | $this->expected = array( |
---|
29 | array( |
---|
30 | 'other_deliv_id' => '1000', |
---|
31 | 'customer_id' => '1', |
---|
32 | 'name01' => 'テスト', |
---|
33 | 'name02' => 'いち', |
---|
34 | 'kana01' => 'テスト', |
---|
35 | 'kana02' => 'イチ', |
---|
36 | 'zip01' => '000', |
---|
37 | 'zip02'=> '0000', |
---|
38 | 'pref' => '1', |
---|
39 | 'addr01' => 'テスト', |
---|
40 | 'addr02' => 'テスト2', |
---|
41 | 'tel01' => '000', |
---|
42 | 'tel02' => '0000', |
---|
43 | 'tel03' => '0000', |
---|
44 | 'fax01' => '111', |
---|
45 | 'fax02' => '1111', |
---|
46 | 'fax03' => '1111', |
---|
47 | 'country_id' => null |
---|
48 | ) |
---|
49 | |
---|
50 | ); |
---|
51 | $this->actual = $this->objAddress->getList($customer_id, $startno); |
---|
52 | |
---|
53 | $this->verify('配送先一覧取得'); |
---|
54 | } |
---|
55 | |
---|
56 | public function testgetListTest_会員が該当テーブルに存在する場合_配送先のarrayを返す() |
---|
57 | { |
---|
58 | $this->setUpAddress(); |
---|
59 | $customer_id = '1'; |
---|
60 | $this->expected = array( |
---|
61 | array( |
---|
62 | 'other_deliv_id' => '1001', |
---|
63 | 'customer_id' => '1', |
---|
64 | 'name01' => 'テスト', |
---|
65 | 'name02' => 'に', |
---|
66 | 'kana01' => 'テスト', |
---|
67 | 'kana02' => 'ニ', |
---|
68 | 'zip01' => '222', |
---|
69 | 'zip02'=> '2222', |
---|
70 | 'pref' => '2', |
---|
71 | 'addr01' => 'テスト1', |
---|
72 | 'addr02' => 'テスト2', |
---|
73 | 'tel01' => '000', |
---|
74 | 'tel02' => '0000', |
---|
75 | 'tel03' => '0000', |
---|
76 | 'fax01' => '111', |
---|
77 | 'fax02' => '1111', |
---|
78 | 'fax03' => '1111', |
---|
79 | 'country_id' => null |
---|
80 | ), |
---|
81 | array( |
---|
82 | 'other_deliv_id' => '1000', |
---|
83 | 'customer_id' => '1', |
---|
84 | 'name01' => 'テスト', |
---|
85 | 'name02' => 'いち', |
---|
86 | 'kana01' => 'テスト', |
---|
87 | 'kana02' => 'イチ', |
---|
88 | 'zip01' => '000', |
---|
89 | 'zip02'=> '0000', |
---|
90 | 'pref' => '1', |
---|
91 | 'addr01' => 'テスト', |
---|
92 | 'addr02' => 'テスト2', |
---|
93 | 'tel01' => '000', |
---|
94 | 'tel02' => '0000', |
---|
95 | 'tel03' => '0000', |
---|
96 | 'fax01' => '111', |
---|
97 | 'fax02' => '1111', |
---|
98 | 'fax03' => '1111', |
---|
99 | 'country_id' => null |
---|
100 | ) |
---|
101 | |
---|
102 | ); |
---|
103 | $this->actual = $this->objAddress->getList($customer_id); |
---|
104 | |
---|
105 | $this->verify('配送先一覧取得'); |
---|
106 | } |
---|
107 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.