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

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

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

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    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
21    public function testGetDetail_商品IDの詳細情報を返す() {
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]
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')
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        );
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.