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

Revision 23335, 1.1 KB checked in by kimoto, 10 years ago (diff)

#2503 setTaxRuleのテストを追加

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        $this->expected = array(
28            'apply_date' => '2000-10-10 10:10:10',
29            'calc_rule' => '1',
30            'tax_rate' => '5',
31        );
32        $this->objTaxRule->setTaxRule(
33            $this->expected['calc_rule'],
34            $this->expected['tax_rate'],
35            $this->expected['apply_date']);
36
37        $result = $this->objQuery->select(
38            'apply_date, calc_rule, tax_rate',
39            'dtb_tax_rule',
40            'apply_date = ?',
41            array($this->expected['apply_date'])
42        );
43
44        $this->actual = $result[0];
45        $this->verify();
46    }
47}
Note: See TracBrowser for help on using the repository browser.