source: branches/feature-module-update/test/class/db/SC_DB_DBFactory_Test.php @ 15532

Revision 15532, 1004 bytes checked in by nanasess, 15 years ago (diff)

svn:mime-type 修正

  • 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 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8// {{{ requires
9require_once($include_dir . "/../data/class/db_extends/SC_DB_DBFactory_Ex.php"); // FIXME
10require_once("PHPUnit/TestCase.php");
11
12/**
13 * SC_DB_DBFactory のテストケース.
14 *
15 * @package DB
16 * @author LOCKON CO.,LTD.
17 * @version $Id$
18 */
19class SC_DB_DBFactory_Test extends PHPUnit_TestCase {
20
21    // }}}
22    // {{{ functions
23
24    function testSfGetDBVersion() {
25        $dbFactory = SC_DB_DBFactory::getInstance();
26        $objQuery = new SC_Query(DEFAULT_DSN, true, true);
27        switch (DB_TYPE) {
28            case "pgsql":
29                $this->assertEquals(true, preg_match("/^PostgreSQL [78].[0-9].[0-9]{1,}$/", $dbFactory->sfGetDBVersion()));
30            break;
31
32            case "mysql":
33                $this->assertEquals(true, preg_match("/^MySQL [78].[0-9].[0-9]{1,}$/", $dbFactory->sfGetDBVersion()));
34            break;
35            default:
36        }
37    }
38}
39?>
Note: See TracBrowser for help on using the repository browser.