source: branches/camp/camp-2_13-tests/tests/class/helper/SC_Helper_News/SC_Helper_News_TestBase.php @ 22722

Revision 22722, 2.6 KB checked in by takeda, 11 years ago (diff)

#2184 news_id開始値の変更

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_Purchaseのテストの基底クラス.
28 *
29 *
30 * @author Hiroko Tamagawa
31 * @version $Id$
32 */
33class SC_Helper_News_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 setUpNews()
50    {
51        $news = array(
52          array(
53            'update_date' => '2000-01-01 00:00:00',
54            'news_id' => '1001',
55            'news_title' => 'ニュース情報01',
56            'rank' => '1',
57            'creator_id' => '1',
58            'del_flg' => '0'
59            ),
60          array(
61            'update_date' => '2000-01-01 00:00:00',
62            'news_id' => '1002',
63            'news_title' => 'ニュース情報02',
64            'rank' => '2',
65            'creator_id' => '1',
66            'del_flg' => '0'
67            ),
68          array(
69            'update_date' => '2000-01-01 00:00:00',
70            'news_id' => '1003',
71            'news_title' => 'ニュース情報03',
72            'rank' => '3',
73            'creator_id' => '1',
74            'del_flg' => '1'
75            ),
76          array(
77            'update_date' => '2000-01-01 00:00:00',
78            'news_id' => '1004',
79            'news_title' => 'ニュース情報04',
80            'rank' => '4',
81            'creator_id' => '1',
82            'del_flg' => '0'
83            )
84        );
85
86        $this->objQuery->delete('dtb_news');
87        foreach ($news as $key => $item) {
88            $this->objQuery->insert('dtb_news', $item);
89        }
90    }
91}
92
Note: See TracBrowser for help on using the repository browser.