1 | <?php |
---|
2 | /* |
---|
3 | * This file is part of EC-CUBE |
---|
4 | * |
---|
5 | * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved. |
---|
6 | * |
---|
7 | * http://www.lockon.co.jp/ |
---|
8 | * |
---|
9 | * This program is free software; you can redistribute it and/or |
---|
10 | * modify it under the terms of the GNU General Public License |
---|
11 | * as published by the Free Software Foundation; either version 2 |
---|
12 | * of the License, or (at your option) any later version. |
---|
13 | * |
---|
14 | * This program is distributed in the hope that it will be useful, |
---|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | * GNU General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with this program; if not, write to the Free Software |
---|
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | |
---|
24 | $HOME = realpath(dirname(__FILE__)) . "/../../.."; |
---|
25 | require_once($HOME . "/tests/class/Common_TestCase.php"); |
---|
26 | |
---|
27 | class SC_CheckError_EXIST_CHECK_REVERSETest extends Common_TestCase |
---|
28 | { |
---|
29 | |
---|
30 | protected function setUp() |
---|
31 | { |
---|
32 | parent::setUp(); |
---|
33 | } |
---|
34 | |
---|
35 | protected function tearDown() |
---|
36 | { |
---|
37 | parent::tearDown(); |
---|
38 | } |
---|
39 | |
---|
40 | ///////////////////////////////////////// |
---|
41 | |
---|
42 | public function testEXIST_CHECK_REVERSE_formが空() |
---|
43 | { |
---|
44 | $arrForm = array('form' => ''); |
---|
45 | $objErr = new SC_CheckError_Ex($arrForm); |
---|
46 | $objErr->doFunc(array('form', 'EXIST_CHECK_REVERSE') ,array('EXIST_CHECK_REVERSE')); |
---|
47 | |
---|
48 | $this->expected = '※ EXIST_CHECK_REVERSEが入力されていません。<br />'; |
---|
49 | $this->actual = $objErr->arrErr['form']; |
---|
50 | $this->verify(''); |
---|
51 | } |
---|
52 | |
---|
53 | public function testEXIST_CHECK_REVERSE_formがNULL() |
---|
54 | { |
---|
55 | $arrForm = array('form' => NULL); |
---|
56 | $objErr = new SC_CheckError_Ex($arrForm); |
---|
57 | $objErr->doFunc(array('form', 'EXIST_CHECK_REVERSE') ,array('EXIST_CHECK_REVERSE')); |
---|
58 | |
---|
59 | $this->expected = '※ EXIST_CHECK_REVERSEが入力されていません。<br />'; |
---|
60 | $this->actual = $objErr->arrErr['form']; |
---|
61 | $this->verify(''); |
---|
62 | } |
---|
63 | |
---|
64 | public function testEXIST_CHECK_REVERSE_formがint0() |
---|
65 | { |
---|
66 | $arrForm = array('form' => 0); |
---|
67 | $objErr = new SC_CheckError_Ex($arrForm); |
---|
68 | $objErr->doFunc(array('form', 'EXIST_CHECK_REVERSE') ,array('EXIST_CHECK_REVERSE')); |
---|
69 | |
---|
70 | $this->expected = ''; |
---|
71 | $this->actual = $objErr->arrErr['form']; |
---|
72 | $this->verify(''); |
---|
73 | } |
---|
74 | |
---|
75 | public function testEXIST_CHECK_REVERSE_formがstring0() |
---|
76 | { |
---|
77 | $arrForm = array('form' => '0'); |
---|
78 | $objErr = new SC_CheckError_Ex($arrForm); |
---|
79 | $objErr->doFunc(array('form', 'EXIST_CHECK_REVERSE') ,array('EXIST_CHECK_REVERSE')); |
---|
80 | |
---|
81 | $this->expected = ''; |
---|
82 | $this->actual = $objErr->arrErr['form']; |
---|
83 | $this->verify(''); |
---|
84 | } |
---|
85 | } |
---|