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

Revision 23664, 4.5 KB checked in by Seasoft, 10 years ago (diff)

#2644 (SC_DB_DBFactory::alldtlSQL から class_count を削除)

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