source: branches/version-2_13-dev/tests/class/helper/SC_Helper_TaxRule/SC_Helper_TaxRule_setTaxRuleTest.php @ 23336

Revision 23336, 1.2 KB checked in by kimoto, 10 years ago (diff)

#2503 postgresでエラーが出てしまうのでsessionを追加

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/helper/SC_Helper_TaxRule/SC_Helper_TaxRule_TestBase.php");
5
6class SC_Helper_TaxRule_setTaxRuleTest extends SC_Helper_TaxRule_TestBase
7{
8
9    protected function setUp()
10    {
11        parent::setUp();
12        $this->objTaxRule = new SC_Helper_TaxRule_Ex();
13    }
14
15    protected function tearDown()
16    {
17        parent::tearDown();
18    }
19
20    /////////////////////////////////////////
21
22    /**
23     * @test
24     */
25    public function 新規登録が出来る()
26    {
27        // postgresとmysqlでmember_idのカラムに差がある
28        $_SESSION['member_id'] = 1;
29        $this->expected = array(
30            'apply_date' => '2000-10-10 10:10:10',
31            'calc_rule' => '1',
32            'tax_rate' => '5',
33        );
34        $this->objTaxRule->setTaxRule(
35            $this->expected['calc_rule'],
36            $this->expected['tax_rate'],
37            $this->expected['apply_date']);
38
39        $result = $this->objQuery->select(
40            'apply_date, calc_rule, tax_rate',
41            'dtb_tax_rule',
42            'apply_date = ?',
43            array($this->expected['apply_date'])
44        );
45
46        $this->actual = $result[0];
47        $this->verify();
48    }
49}
Note: See TracBrowser for help on using the repository browser.