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 | |
---|
11 | protected function setUp() |
---|
12 | { |
---|
13 | parent::setUp(); |
---|
14 | $this->setUpProductClass(); |
---|
15 | $this->objProducts = new SC_Product_Ex(); |
---|
16 | } |
---|
17 | |
---|
18 | protected function tearDown() |
---|
19 | { |
---|
20 | parent::tearDown(); |
---|
21 | } |
---|
22 | |
---|
23 | ///////////////////////////////////////// |
---|
24 | |
---|
25 | public function testlists_商品一覧取得() |
---|
26 | { |
---|
27 | //更新日を取得 |
---|
28 | $col = 'update_date'; |
---|
29 | $table = 'dtb_products'; |
---|
30 | $where = 'product_id IN (1001, 1002)'; |
---|
31 | $this->objQuery->setOrder('product_id'); |
---|
32 | $arrRet = $this->objQuery->getCol($col, $table, $where); |
---|
33 | |
---|
34 | $this->expected = array( |
---|
35 | 0 => array( |
---|
36 | 'product_id' => '1001', |
---|
37 | 'product_code_min' => 'code1001', |
---|
38 | 'product_code_max' => 'code1001', |
---|
39 | 'name' => '製品名1001', |
---|
40 | 'comment1' => 'コメント10011', |
---|
41 | 'comment2' => 'コメント10012', |
---|
42 | 'comment3' => 'コメント10013', |
---|
43 | 'main_list_comment' => 'リストコメント1001', |
---|
44 | 'main_image' => '1001.jpg', |
---|
45 | 'main_list_image' => '1001-main.jpg', |
---|
46 | 'price01_min' => '1500', |
---|
47 | 'price01_max' => '1500', |
---|
48 | 'price02_min' => '1500', |
---|
49 | 'price02_max' => '1500', |
---|
50 | 'stock_min' => '99', |
---|
51 | 'stock_max' => '99', |
---|
52 | 'stock_unlimited_min' => '0', |
---|
53 | 'stock_unlimited_max' => '0', |
---|
54 | 'deliv_date_id' => '1', |
---|
55 | 'status' => '1', |
---|
56 | 'del_flg' => '0', |
---|
57 | 'update_date' => $arrRet[0], |
---|
58 | ), |
---|
59 | 1 => array( |
---|
60 | 'product_id' => '1002', |
---|
61 | 'product_code_min' => 'code1002', |
---|
62 | 'product_code_max' => 'code1002', |
---|
63 | 'name' => '製品名1002', |
---|
64 | 'comment1' => 'コメント10021', |
---|
65 | 'comment2' => 'コメント10022', |
---|
66 | 'comment3' => 'コメント10023', |
---|
67 | 'main_list_comment' => 'リストコメント1002', |
---|
68 | 'main_image' => '1002.jpg', |
---|
69 | 'main_list_image' => '1002-main.jpg', |
---|
70 | 'price01_min' => null, |
---|
71 | 'price01_max' => null, |
---|
72 | 'price02_min' => '2500', |
---|
73 | 'price02_max' => '2500', |
---|
74 | 'stock_min' => null, |
---|
75 | 'stock_max' => null, |
---|
76 | 'stock_unlimited_min' => '1', |
---|
77 | 'stock_unlimited_max' => '1', |
---|
78 | 'deliv_date_id' => '2', |
---|
79 | 'status' => '2', |
---|
80 | 'del_flg' => '0', |
---|
81 | 'update_date' => $arrRet[1], |
---|
82 | ), |
---|
83 | ); |
---|
84 | |
---|
85 | $this->actual = $this->objProducts->lists($this->objQuery); |
---|
86 | |
---|
87 | $this->verify('商品一覧'); |
---|
88 | } |
---|
89 | |
---|
90 | } |
---|