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

Revision 22567, 3.6 KB checked in by shutta, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

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->objProducts = new SC_Product_Ex();
15    }
16
17    protected function tearDown()
18    {
19        parent::tearDown();
20    }
21
22    /////////////////////////////////////////
23
24    public function testGetDetail_商品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_DB_Ex::sfCalcIncTax('1500')
57                ,'price01_max_inctax' => SC_Helper_DB_Ex::sfCalcIncTax('1500')
58                ,'price02_min_inctax' => SC_Helper_DB_Ex::sfCalcIncTax('1500')
59                ,'price02_max_inctax' => SC_Helper_DB_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        );
98
99        $this->actual = $this->objProducts->getDetail('1001');
100
101        $this->verify('商品詳細');
102    }
103   
104}
Note: See TracBrowser for help on using the repository browser.