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

Revision 23664, 3.5 KB checked in by Seasoft, 9 years ago (diff)

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

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_getDetailTest 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 testGetDetail_商品IDの詳細情報を返す()
26    {
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]
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)
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        );
94
95        $this->actual = $this->objProducts->getDetail('1001');
96
97        $this->verify('商品詳細');
98    }
99   
100}
Note: See TracBrowser for help on using the repository browser.