source: branches/version-2_12-dev/tests/class/SC_Product/SC_Product_getProductStatusTest.php @ 22191

Revision 22191, 1.3 KB checked in by poego, 11 years ago (diff)

#1993 SC_Productテストケース作成

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    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 testGetProductStatus_商品ID指定なし() {
22        $this->setUpProductClass();
23        $this->setUpProducts();
24        $this->setUpClassCategory();
25        $this->setUpProductStatus();
26
27        $this->expected = array();
28        $productIds = null;
29
30        $this->actual = $this->objProducts->getProductStatus($productIds);
31
32        $this->verify('空の配列');
33    }
34   
35    public function testGetProductStatus_商品ID指定() {
36        $this->setUpProductClass();
37        $this->setUpProducts();
38        $this->setUpClassCategory();
39        $this->setUpProductStatus();
40
41        $this->expected = array('1001' => array('1'));
42        $productIds = array('1001');
43
44        $this->actual = $this->objProducts->getProductStatus($productIds);
45
46        $this->verify('商品ステータス');
47    }
48   
49   
50}
Note: See TracBrowser for help on using the repository browser.