source: branches/version-2_12-dev/tests/class/SC_Product/SC_Product_setProductsOrderTest.php @ 22188

Revision 22188, 1.1 KB checked in by nanasess, 10 years ago (diff)

#1993 ([共通クラス]SC_Products)

基底クラスと, 以下を追加

  • SC_Product::findProductIdsOrder
  • SC_Product_setProductsOrder
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_setProductsOrderTest 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    public function testSetProductsOrder_デフォルト引数() {
21        $this->objProducts->setProductsOrder('name');
22
23        $this->actual = $this->objProducts->arrOrderData;
24        $this->expected = array('col' => 'name', 'table' => 'dtb_products', 'order' => 'ASC');
25
26        $this->verify('デフォルト引数');
27    }
28
29    public function testSetProductsOrder_引数指定() {
30        $this->objProducts->setProductsOrder('name', 'dtb_products_class', 'DESC');
31
32        $this->actual = $this->objProducts->arrOrderData;
33        $this->expected = array('col' => 'name', 'table' => 'dtb_products_class', 'order' => 'DESC');
34
35        $this->verify('デフォルト引数');
36    }
37}
Note: See TracBrowser for help on using the repository browser.