source: branches/version-2_12-dev/tests/class/SC_Product/SC_Product_findProductCountTest.php @ 22192

Revision 22192, 1.2 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_findProductCountTest 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 testFindProductCount_すべての商品数を返す() {
22        $this->setUpProductClass();
23        $this->setUpProducts();
24        $this->setUpClassCategory();
25
26        $this->expected = 3;
27
28        $this->actual = $this->objProducts->findProductCount($this->objQuery);
29
30        $this->verify('商品数');
31    }
32   
33    public function testFindProductCount_検索条件に一致する商品数を返す() {
34        $this->setUpProductClass();
35        $this->setUpProducts();
36        $this->setUpClassCategory();
37       
38        $this->objQuery->setWhere('product_id = ?');
39        $arrVal = array(1001);
40
41        $this->expected = 1;
42
43        $this->actual = $this->objProducts->findProductCount($this->objQuery, $arrVal);
44
45        $this->verify('検索商品数');
46    }
47   
48}
Note: See TracBrowser for help on using the repository browser.