source: branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassTest.php @ 23555

Revision 23555, 1.8 KB checked in by shutta, 10 years ago (diff)

#1993 [共通クラス]SC_Product
dtb_classテーブルのデータ初期化が漏れていたので追加。(必要なデータはクラス内で用意させる)
setUp周りの冗長な処理を改善。

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../..";
4require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php");
5/**
6 *
7 */
8class SC_Product_getProductsClassTest extends SC_Product_TestBase
9{
10
11    protected function setUp()
12    {
13        parent::setUp();
14        $this->setUpProductClass();
15        $this->objProducts = new SC_Product_Ex();
16    }
17
18    protected function tearDown()
19    {
20        parent::tearDown();
21    }
22
23    /////////////////////////////////////////
24
25    public function testGetProductsClass_商品規格IDから規格情報を返す()
26    {
27        $this->expected = array(
28                'product_id' => '1001'
29                ,'del_flg' => '0'
30                ,'point_rate' => '0'
31                ,'stock' => '99'
32                ,'stock_unlimited' => '0'
33                ,'sale_limit' => null
34                ,'price01' => '1500'
35                ,'price02' => '1500'
36                ,'product_code' => 'code1001'
37                ,'product_class_id' => '1001'
38                ,'product_type_id' => '1'
39                ,'down_filename' => null
40                ,'down_realfilename' => null
41                ,'classcategory_name1' => 'cat1001'
42                ,'rank1' => '1'
43                ,'class_name1' => '味'
44                ,'class_id1' => '1'
45                ,'classcategory_id1' => '1001'
46                ,'classcategory_id2' => '1002'
47                ,'classcategory_name2' => 'cat1002'
48                ,'rank2' => '2'
49                ,'class_name2' => '味'
50                ,'class_id2' => '1'
51                ,'price01_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
52                ,'price02_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
53        );
54
55        $this->actual = $this->objProducts->getProductsClass('1001');
56
57        $this->verify('商品規格');
58    }
59
60}
Note: See TracBrowser for help on using the repository browser.