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

Revision 23294, 2.0 KB checked in by kimoto, 8 years ago (diff)

#2189 r23276の修正に対応

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_getAddressTest extends SC_Helper_Address_TestBase
9{
10
11    protected function setUp()
12    {
13        parent::setUp();
14        $this->objAddress = new SC_Helper_Address_Ex();
15        $_SESSION['customer']['customer_id'] = 1; // 会員じゃないとテストが落ちる
16    }
17
18    protected function tearUp()
19    {
20        parent::tearUp();
21    }
22
23    /////////////////////////////////////////
24
25
26    public function testgetAddressTest_会員の登録配送先が該当テーブルに存在しない場合_FALSEを返す()
27    {
28        $this->setUpAddress();
29        $other_deliv_id = '999';
30        $this->expected = FALSE;
31        $this->actual = $this->objAddress->getAddress($other_deliv_id);
32
33        $this->verify('登録配送先取得');
34    }
35
36    public function testgetAddressTest_会員の登録配送先が該当テーブルに存在する場合_2を返す()
37    {
38        $this->setUpAddress();
39        $other_deliv_id = '1001';
40        $this->expected = array(
41                'other_deliv_id' => '1001',
42                'customer_id' => '1',
43                'name01' => 'テスト',
44                'name02' => 'に',
45                'kana01' => 'テスト',
46                'kana02' => 'ニ',
47                'zip01' => '222',
48                'zip02'=> '2222',
49                'pref' => '2',
50                'addr01' => 'テスト1',
51                'addr02' => 'テスト2',
52                'tel01' => '000',
53                'tel02' => '0000',
54                'tel03' => '0000',
55                'fax01' => '111',
56                'fax02' => '1111',
57                'fax03' => '1111',
58                'country_id' => null,
59                'company_name' => null,
60                'zipcode' => null
61            );
62        $this->actual = $this->objAddress->getAddress($other_deliv_id);
63
64        $this->verify('登録配送先取得');
65    }
66}
Note: See TracBrowser for help on using the repository browser.