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

Revision 23032, 1.9 KB checked in by nanasess, 11 years ago (diff)

#150 (ユニットテスト環境の整備)

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