source: branches/version-2_12-dev/tests/class/SC_Product/SC_Product_getDetailAndProductsClassTest.php @ 22484

Revision 22484, 4.5 KB checked in by Seasoft, 11 years ago (diff)

#2091 (拡張クラスを使っていない)

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