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__)) . "/../../.."; |
---|
4 | require_once($HOME . "/tests/class/SC_Product/SC_Product_TestBase.php"); |
---|
5 | /** |
---|
6 | * |
---|
7 | */ |
---|
8 | class SC_Product_findProductCountTest 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 testFindProductCount_全ての商品数を返す() |
---|
26 | { |
---|
27 | $this->expected = 3; |
---|
28 | |
---|
29 | $this->actual = $this->objProducts->findProductCount($this->objQuery); |
---|
30 | |
---|
31 | $this->verify('商品数'); |
---|
32 | } |
---|
33 | |
---|
34 | public function testFindProductCount_検索条件に一致する商品数を返す() |
---|
35 | { |
---|
36 | $this->objQuery->setWhere('product_id = ?'); |
---|
37 | $arrVal = array(1001); |
---|
38 | |
---|
39 | $this->expected = 1; |
---|
40 | |
---|
41 | $this->actual = $this->objProducts->findProductCount($this->objQuery, $arrVal); |
---|
42 | |
---|
43 | $this->verify('検索商品数'); |
---|
44 | } |
---|
45 | |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.