source: branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php @ 23543

Revision 23543, 4.6 KB checked in by shutta, 10 years ago (diff)

#2558 商品管理>商品登録(商品規格) dtb_classcategory.del_flg を関知していない
r23541 では不十分だったので、残りの1失敗(MySQL)への修正。

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_getDetailAndProductsClassTest extends SC_Product_TestBase
9{
10
11    protected function setUp()
12    {
13        parent::setUp();
14        $this->objProducts = new SC_Product_Ex();
15    }
16
17    protected function tearDown()
18    {
19        parent::tearDown();
20    }
21
22    /////////////////////////////////////////
23
24    public function testGetDetailAndProductsClass_商品規格IDの商品情報と規格情報を返す()
25    {
26        $this->setUpProductClass();
27        $this->setUpProducts();
28        $this->setUpClassCategory();
29
30        //更新日を取得
31        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
32
33        $this->expected = array(
34                'product_id' => '1001'
35                ,'product_code_min' => 'code1001'
36                ,'product_code_max' => 'code1001'
37                ,'name' => '製品名1001'
38                ,'comment1' => 'コメント10011'
39                ,'comment2' => 'コメント10012'
40                ,'comment3' => 'コメント10013'
41                ,'main_list_comment' => 'リストコメント1001'
42                ,'main_image' => '1001.jpg'
43                ,'main_list_image' => '1001-main.jpg'
44                ,'price01_min' => '1500'
45                ,'price01_max' => '1500'
46                ,'price02_min' => '1500'
47                ,'price02_max' => '1500'
48                ,'stock_min' => '99'
49                ,'stock_max' => '99'
50                ,'stock_unlimited_min' => '0'
51                ,'stock_unlimited_max' => '0'
52                ,'deliv_date_id' => '1'
53                ,'status' => '1'
54                ,'del_flg' => '0'
55                ,'update_date' => $arrRet[0]
56                ,'price01_min_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
57                ,'price01_max_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
58                ,'price02_min_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
59                ,'price02_max_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
60                ,'maker_id' => null
61                ,'comment4' => null
62                ,'comment5' => null
63                ,'comment6' => null
64                ,'note' => null
65                ,'main_comment' => 'メインコメント1001'
66                ,'main_large_image' => null
67                ,'sub_title1' => null
68                ,'sub_comment1' => null
69                ,'sub_image1' => null
70                ,'sub_large_image1' => null
71                ,'sub_title2' => null
72                ,'sub_comment2' => null
73                ,'sub_image2' => null
74                ,'sub_large_image2' => null
75                ,'sub_title3' => null
76                ,'sub_comment3' => null
77                ,'sub_image3' => null
78                ,'sub_large_image3' => null
79                ,'sub_title4' => null
80                ,'sub_comment4' => null
81                ,'sub_image4' => null
82                ,'sub_large_image4' => null
83                ,'sub_title5' => null
84                ,'sub_comment5' => null
85                ,'sub_image5' => null
86                ,'sub_large_image5' => null
87                ,'sub_title6' => null
88                ,'sub_comment6' => null
89                ,'sub_image6' => null
90                ,'sub_large_image6' => null
91                ,'creator_id' => '1'
92                ,'create_date' => $arrRet[0]
93                ,'point_rate' => '0'
94                ,'deliv_fee' => null
95                ,'class_count' => '1'
96                ,'maker_name' => null
97                ,'stock' => '99'
98                ,'stock_unlimited' => '0'
99                ,'sale_limit' => null
100                ,'price01' => '1500'
101                ,'price02' => '1500'
102                ,'product_code' => 'code1001'
103                ,'product_class_id' => '1001'
104                ,'product_type_id' => '1'
105                ,'down_filename' => null
106                ,'down_realfilename' => null
107                ,'classcategory_name1' => 'cat1001'
108                ,'rank1' => '1'
109                ,'class_name1' => '味'
110                ,'class_id1' => '1'
111                ,'classcategory_id1' => '1001'
112                ,'classcategory_id2' => '1002'
113                ,'classcategory_name2' => 'cat1002'
114                ,'rank2' => '2'
115                ,'class_name2' => '味'
116                ,'class_id2' => '1'
117                ,'price01_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
118                ,'price02_inctax' => SC_Helper_TaxRule_Ex::sfCalcIncTax(1500)
119        );
120
121        $this->actual = $this->objProducts->getDetailAndProductsClass('1001');
122
123        $this->verify('商品詳細+規格');
124    }
125
126}
Note: See TracBrowser for help on using the repository browser.