source: branches/comu-ver2/test/class/db/SC_DB_DBFactory_Test.php @ 18234

Revision 18234, 2.1 KB checked in by Seasoft, 13 years ago (diff)

#528(改行コードが混在している)

  • SVN属性の変更。ただし、以下は除外。
    • /data/module
    • /data/pdf
    • /html/test
  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id Revision Date
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2009 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// {{{ requires
25require_once("../html/require.php");
26require_once("../data/class_extends/db_extends/SC_DB_DBFactory_Ex.php");
27require_once("PHPUnit/Framework.php");
28
29/**
30 * SC_DB_DBFactory TestCase
31 *
32 * @package DB
33 * @author LOCKON CO.,LTD.
34 * @version $Id:SC_DB_DBFactory_Test.php 15532 2007-08-31 14:39:46Z nanasess $
35 */
36class SC_DB_DBFactory_Test extends PHPUnit_Framework_TestCase {
37
38    // }}}
39    // {{{ functions
40
41    /* TODO
42    function testSfGetDBVersion() {
43        $dbFactory = SC_DB_DBFactory::getInstance();
44        $objQuery = new SC_Query(DEFAULT_DSN, true, true);
45        switch (DB_TYPE) {
46            case "pgsql":
47                $this->assertEquals(true, preg_match("/^PostgreSQL [78].[0-9].[0-9]{1,}$/", $dbFactory->sfGetDBVersion()));
48            break;
49
50            case "mysql":
51                $this->assertEquals(true, preg_match("/^MySQL [78].[0-9].[0-9]{1,}$/", $dbFactory->sfGetDBVersion()));
52            break;
53            default:
54        }
55    }
56    */
57
58    function testFindTableNames() {
59        $dbFactory = SC_DB_DBFactory::getInstance();
60        $objQuery = new SC_Query(DEFAULT_DSN, true, true);
61        $actual = $dbFactory->findTableNames("mtb_pre");
62        $this->assertEquals("mtb_pref", $actual[0]);
63    }
64}
65
66/*
67 * Local variables:
68 * coding: utf-8
69 * End:
70 */
71?>
Note: See TracBrowser for help on using the repository browser.