source: branches/version-2_13-dev/tests/class/helper/SC_Helper_Address/SC_Helper_Address_getListTest.php @ 22723

Revision 22723, 3.3 KB checked in by tokuhiro, 11 years ago (diff)

#2189 SC_Helper_Addressのテストケースを追加

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/helper/SC_Helper_Address/SC_Helper_Address_TestBase.php");
5/**
6 *
7 */
8class 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                  )
48
49                                );
50        $this->actual = $this->objAddress->getList($customer_id, $startno);
51       
52        $this->verify('配送先一覧取得');
53    }
54
55    public function testgetListTest_会員が該当テーブルに存在する場合_配送先のarrayを返す()
56    {
57        $this->setUpAddress();
58        $customer_id = '1';
59        $this->expected = array(
60                        array(
61                'other_deliv_id' => '1001',
62                'customer_id' => '1',
63                'name01' => 'テスト',
64                'name02' => 'に',
65                'kana01' => 'テスト',
66                'kana02' => 'ニ',
67                'zip01' => '222',
68                'zip02'=> '2222',
69                'pref' => '2',
70                'addr01' => 'テスト1',
71                'addr02' => 'テスト2',
72                'tel01' => '000',
73                'tel02' => '0000',
74                'tel03' => '0000',
75                'fax01' => '111',
76                'fax02' => '1111',
77                'fax03' => '1111'
78                  ),
79            array(
80                'other_deliv_id' => '1000',
81                'customer_id' => '1',
82                'name01' => 'テスト',
83                'name02' => 'いち',
84                'kana01' => 'テスト',
85                'kana02' => 'イチ',
86                'zip01' => '000',
87                'zip02'=> '0000',
88                'pref' => '1',
89                'addr01' => 'テスト',
90                'addr02' => 'テスト2',
91                'tel01' => '000',
92                'tel02' => '0000',
93                'tel03' => '0000',
94                'fax01' => '111',
95                'fax02' => '1111',
96                'fax03' => '1111'
97                  )
98
99                                );
100        $this->actual = $this->objAddress->getList($customer_id);
101       
102        $this->verify('配送先一覧取得');
103    }
104
105
106}
Note: See TracBrowser for help on using the repository browser.