source: branches/version-2_13-dev/tests/class/SC_Product/SC_Product_getProductStatusTest.php @ 23555

Revision 23555, 1.1 KB checked in by shutta, 10 years ago (diff)

#1993 [共通クラス]SC_Product
dtb_classテーブルのデータ初期化が漏れていたので追加。(必要なデータはクラス内で用意させる)
setUp周りの冗長な処理を改善。

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_getProductStatusTest extends SC_Product_TestBase
9{
10
11    protected function setUp()
12    {
13        parent::setUp();
14        $this->setUpProductClass();
15        $this->setUpProductStatus();
16        $this->objProducts = new SC_Product_Ex();
17    }
18
19    protected function tearDown()
20    {
21        parent::tearDown();
22    }
23
24    /////////////////////////////////////////
25
26    public function testGetProductStatus_商品IDなしは空の配列を返す()
27    {
28        $this->expected = array();
29        $productIds = null;
30
31        $this->actual = $this->objProducts->getProductStatus($productIds);
32
33        $this->verify('空の配列');
34    }
35   
36    public function testGetProductStatus_指定した商品IDの商品ステータスを返す()
37    {
38        $this->expected = array('1001' => array('1'));
39        $productIds = array('1001');
40
41        $this->actual = $this->objProducts->getProductStatus($productIds);
42
43        $this->verify('商品ステータス');
44    }
45   
46   
47}
Note: See TracBrowser for help on using the repository browser.