source: branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductsClassByQueryTest.php @ 23543

Revision 23543, 1.9 KB checked in by shutta, 10 years ago (diff)

#2558 商品管理>商品登録(商品規格) dtb_classcategory.del_flg を関知していない
r23541 では不十分だったので、残りの1失敗(MySQL)への修正。

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