source: branches/camp/camp-2_13-tests/tests/class/helper/SC_Helper_Maker/SC_Helper_Maker_TestBase.php @ 22727

Revision 22727, 2.9 KB checked in by hiro151, 11 years ago (diff)

#2186 テストコード 途中

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/Common_TestCase.php");
5/*
6 * This file is part of EC-CUBE
7 *
8 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
9 *
10 * http://www.lockon.co.jp/
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25 */
26/**
27 * SC_Helper_Makerのテストの基底クラス.
28 *
29 *
30 * @author hiroshi kakuta
31 * @version $Id$
32 */
33class SC_Helper_Maker_TestBase extends Common_TestCase
34{
35
36    protected function setUp()
37    {
38        parent::setUp();
39    }
40
41    protected function tearDown()
42    {
43        parent::tearDown();
44    }
45
46
47    /**
48     * DBにお勧め情報を登録します.
49     */
50    protected function setUpMaker()
51    {
52        $makers = array(
53            array(
54                'maker_id' => '1001',
55                'name' => 'ソニン',
56                'rank' => '1',
57                'creator_id' => '1',
58                'create_date' => '2000-01-01 00:00:00',
59                'update_date' => '2000-01-01 00:00:00',
60                'del_flg' => '0'
61            ),
62            array(
63                'maker_id' => '1002',
64                'name' => 'パソナニック',
65                'rank' => '2',
66                'creator_id' => '2',
67                'create_date' => '2000-01-01 00:00:00',
68                'update_date' => '2000-01-01 00:00:00',
69                'del_flg' => '1'
70            ),
71            array(
72                'maker_id' => '1003',
73                'name' => 'シャンプー',
74                'rank' => '3',
75                'creator_id' => '1',
76                'create_date' => '2000-01-01 00:00:00',
77                'update_date' => '2000-01-01 00:00:00',
78                'del_flg' => '0'
79            ),
80            array(
81                'maker_id' => '1004',
82                'name' => 'MEC',
83                'rank' => '4',
84                'creator_id' => '1',
85                'create_date' => '2000-01-01 00:00:00',
86                'update_date' => '2000-01-01 00:00:00',
87                'del_flg' => '0'
88            )
89        );
90
91        $this->objQuery->delete('dtb_maker');
92        foreach ($makers as  $item) {
93            $this->objQuery->insert('dtb_maker', $item);
94        }
95    }
96
97    protected function deleteAllMaker(){
98        $this->objQuery->delete('dtb_maker');
99    }
100}
101
Note: See TracBrowser for help on using the repository browser.