Revision 23555,
982 bytes
checked in by shutta, 10 years ago
(diff) |
#1993 [共通クラス]SC_Product
dtb_classテーブルのデータ初期化が漏れていたので追加。(必要なデータはクラス内で用意させる)
setUp周りの冗長な処理を改善。
|
Line | |
---|
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_setProductStatusTest 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 testSetProductStatus_登録した商品ステータスを返す() |
---|
27 | { |
---|
28 | $_SESSION['member_id'] = 1; |
---|
29 | |
---|
30 | $this->objProducts->setProductStatus('1001', array('2','3','4')); |
---|
31 | |
---|
32 | $this->expected = array('1001'=>array('2','3','4')); |
---|
33 | $productIds = array('1001'); |
---|
34 | $this->actual = $this->objProducts->getProductStatus($productIds); |
---|
35 | |
---|
36 | $this->verify('商品ステータスの更新'); |
---|
37 | } |
---|
38 | |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.