source: branches/version-2_13-dev/tests/class/helper/SC_Helper_Maker/SC_Helper_Maker_TestBase.php @ 22856

Revision 22856, 2.9 KB checked in by Seasoft, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)

  • 主に空白・空白行の調整。もう少し整えたいが、一旦現状コミット。
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     * DBにお勧め情報を登録します.
48     */
49    protected function setUpMaker()
50    {
51        $makers = array(
52            array(
53                'maker_id' => '1001',
54                'name' => 'ソニン',
55                'rank' => '1',
56                'creator_id' => '1',
57                'create_date' => '2000-01-01 00:00:00',
58                'update_date' => '2000-01-01 00:00:00',
59                'del_flg' => '0'
60            ),
61            array(
62                'maker_id' => '1002',
63                'name' => 'パソナニック',
64                'rank' => '2',
65                'creator_id' => '2',
66                'create_date' => '2000-01-01 00:00:00',
67                'update_date' => '2000-01-01 00:00:00',
68                'del_flg' => '1'
69            ),
70            array(
71                'maker_id' => '1003',
72                'name' => 'シャンプー',
73                'rank' => '3',
74                'creator_id' => '1',
75                'create_date' => '2000-01-01 00:00:00',
76                'update_date' => '2000-01-01 00:00:00',
77                'del_flg' => '0'
78            ),
79            array(
80                'maker_id' => '1004',
81                'name' => 'MEC',
82                'rank' => '4',
83                'creator_id' => '1',
84                'create_date' => '2000-01-01 00:00:00',
85                'update_date' => '2000-01-01 00:00:00',
86                'del_flg' => '0'
87            )
88        );
89
90        $this->objQuery->delete('dtb_maker');
91        foreach ($makers as  $item) {
92            $this->objQuery->insert('dtb_maker', $item);
93        }
94    }
95
96    protected function deleteAllMaker(){
97        $this->objQuery->delete('dtb_maker');
98    }
99}
100
Note: See TracBrowser for help on using the repository browser.