1 | <?php |
---|
2 | |
---|
3 | $HOME = realpath(dirname(__FILE__)) . "/../../.."; |
---|
4 | require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php"); |
---|
5 | /** |
---|
6 | * |
---|
7 | */ |
---|
8 | class SC_Product_listsTest 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 testlists_商品一覧取得() { |
---|
22 | $this->setUpProductClass(); |
---|
23 | $this->setUpProducts(); |
---|
24 | $this->setUpClassCategory(); |
---|
25 | //更新日を取得 |
---|
26 | $arrRet = $this->objQuery->getCol('update_date','dtb_products', 'product_id = 1001'); |
---|
27 | |
---|
28 | $this->expected = array( |
---|
29 | 0 => 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 | ) |
---|
53 | ,1 => array( |
---|
54 | 'product_id' => '1002' |
---|
55 | ,'product_code_min' => 'code1002' |
---|
56 | ,'product_code_max' => 'code1002' |
---|
57 | ,'name' => '製品名1002' |
---|
58 | ,'comment1' => 'コメント10021' |
---|
59 | ,'comment2' => 'コメント10022' |
---|
60 | ,'comment3' => 'コメント10023' |
---|
61 | ,'main_list_comment' => 'リストコメント1002' |
---|
62 | ,'main_image' => '1002.jpg' |
---|
63 | ,'main_list_image' => '1002-main.jpg' |
---|
64 | ,'price01_min' => null |
---|
65 | ,'price01_max' => null |
---|
66 | ,'price02_min' => '2500' |
---|
67 | ,'price02_max' => '2500' |
---|
68 | ,'stock_min' => null |
---|
69 | ,'stock_max' => null |
---|
70 | ,'stock_unlimited_min' => '1' |
---|
71 | ,'stock_unlimited_max' => '1' |
---|
72 | ,'deliv_date_id' => '2' |
---|
73 | ,'status' => '2' |
---|
74 | ,'del_flg' => '0' |
---|
75 | ,'update_date' => $arrRet[0] |
---|
76 | |
---|
77 | ) |
---|
78 | ); |
---|
79 | |
---|
80 | $this->actual = $this->objProducts->lists($this->objQuery); |
---|
81 | |
---|
82 | $this->verify('商品一覧'); |
---|
83 | } |
---|
84 | |
---|
85 | } |
---|