source: branches/version-2_12-dev/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php @ 22192

Revision 22192, 1.8 KB checked in by poego, 9 years ago (diff)

#1993 SC_Productテスト関数の命名を修正

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_getProductsClassByQueryTest 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 testGetProductsClassByQuery_クエリに該当する商品情報を返す() {
22        $this->setUpProductClass();
23        $this->setUpProducts();
24        $this->setUpClassCategory();
25
26        $this->expected = array(
27            0=> array(
28                'product_id' => '1001'
29                ,'del_flg' => '0'
30                ,'point_rate' => '0'
31                ,'stock' => '99'
32                ,'stock_unlimited' => '0'
33                ,'sale_limit' => null
34                ,'price01' => '1500'
35                ,'price02' => '1500'
36                ,'product_code' => 'code1001'
37                ,'product_class_id' => '1001'
38                ,'product_type_id' => '1'
39                ,'down_filename' => null
40                ,'down_realfilename' => null
41                ,'classcategory_name1' => 'cat1001'
42                ,'rank1' => null
43                ,'class_name1' => '味'
44                ,'class_id1' => '1'
45                ,'classcategory_id1' => '1001'
46                ,'classcategory_id2' => '1002'
47                ,'classcategory_name2' => 'cat1002'
48                ,'rank2' => null
49                ,'class_name2' => '味'
50                ,'class_id2' => '1'
51            )
52        );
53        $this->objQuery->setWhere('product_id = ?');
54
55        $this->actual = $this->objProducts->getProductsClassByQuery($this->objQuery, array('1001'));
56
57        $this->verify('商品情報クエリ');
58    }
59   
60}
Note: See TracBrowser for help on using the repository browser.