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

Revision 22567, 2.9 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_listsTest 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 testlists_商品一覧取得()
25    {
26        $this->setUpProductClass();
27        $this->setUpProducts();
28        $this->setUpClassCategory();
29        //更新日を取得
30        $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001');
31
32        $this->expected = array(
33            0 => 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            )
57            ,1 => array(
58                'product_id' => '1002'
59                ,'product_code_min' => 'code1002'
60                ,'product_code_max' => 'code1002'
61                ,'name' => '製品名1002'
62                ,'comment1' => 'コメント10021'
63                ,'comment2' => 'コメント10022'
64                ,'comment3' => 'コメント10023'
65                ,'main_list_comment' => 'リストコメント1002'
66                ,'main_image' => '1002.jpg'
67                ,'main_list_image' => '1002-main.jpg'
68                ,'price01_min' => null
69                ,'price01_max' => null
70                ,'price02_min' => '2500'
71                ,'price02_max' => '2500'
72                ,'stock_min' => null
73                ,'stock_max' => null
74                ,'stock_unlimited_min' => '1'
75                ,'stock_unlimited_max' => '1'
76                ,'deliv_date_id' => '2'
77                ,'status' => '2'
78                ,'del_flg' => '0'
79                ,'update_date' => $arrRet[0]
80
81            )
82        );
83
84        $this->actual = $this->objProducts->lists($this->objQuery);
85
86        $this->verify('商品一覧');
87    }
88   
89}
Note: See TracBrowser for help on using the repository browser.