Ignore:
Timestamp:
2010/06/02 17:33:40 (14 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20100602055350-ncgtadxmff25rwlj
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

test/README.txt readme.txt-20100602082419-nsx4qv1cfndowwzx-1
test/TestSuite.php 15114@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Ftest%2FTestSuite.php
test/class/SC_DbConn_Test.php sc_dbconn_test.php-20100602082419-nsx4qv1cfndowwzx-2
test/class/db/DB_AllTests.php db_alltests.php-20100602082441-xww9qc01x54i611r-1
test/class/db/SC_DB_DBFactory_Test.php 15242@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Ftest%2Fclass%2Fdb%2FSC_DB_DBFactory_Test.php
test/class/db/SC_DB_MasterData_Test.php 15134@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Ftest%2Fclass%2Fdb%2FSC_DB_MasterData_Test.php
test/class/helper/Helper_AllTests.php helper_alltests.php-20100602082441-xww9qc01x54i611r-2
test/class/helper/SC_Helper_DB_Test.php 15242@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Ftest%2Fclass%2Fhelper%2FSC_Helper_DB_Test.php
test/class/logger logger-20100602082424-nz4465gncvn0f2ew-1
test/class/logger/GC_Log_Log4php_Test.php gc_log_log4php_test.-20100602082441-xww9qc01x54i611r-3
test/class/logger/GC_Logger_Test.php gc_logger_test.php-20100602082441-xww9qc01x54i611r-4
test/class/logger/conf conf-20100602082431-t9dv6n5sv9g4o3ap-1
test/class/logger/conf/log4php.properties log4php.properties-20100602082441-xww9qc01x54i611r-5
test/class/page/LC_Page_Test.php 15114@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Ftest%2Fclass%2Fpage%2FLC_Page_Test.php
test/class/page/Page_AllTests.php page_alltests.php-20100602082441-xww9qc01x54i611r-6
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100602083336-n42mnd01dc5dndnm
bzr:revno:
1946
bzr:revprop:branch-nick:
branches/version-2_4-dev
bzr:root:
branches/version-2_4-dev
bzr:text-parents:

test/TestSuite.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:16582
test/class/db/SC_DB_DBFactory_Test.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:16582
test/class/db/SC_DB_MasterData_Test.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:16582
test/class/helper/SC_Helper_DB_Test.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:16582
test/class/page/LC_Page_Test.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/feature-module-update:16582
bzr:timestamp:
2010-06-02 17:33:36.500999928 +0900
bzr:user-agent:
bzr2.1.1+bzr-svn1.0.2
svn:original-date:
2010-06-02T08:33:36.501000Z
Message:

コミュニティ版のテストケースを移植

Location:
branches/version-2_4-dev/test
Files:
10 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4-dev/test/TestSuite.php

    r16582 r18668  
    1 #!/usr/local/bin/php 
    21<?php 
    32/* 
    43 * This file is part of EC-CUBE 
    54 * 
    6  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2009 LOCKON CO.,LTD. All Rights Reserved. 
    76 * 
    87 * http://www.lockon.co.jp/ 
     
    2322 */ 
    2423 
    25 ini_set("include_path", ".:/usr/local/share/pear"); 
    2624// {{{ requires 
    2725require_once("../html/require.php"); 
    28 require_once("class/page/LC_Page_Test.php"); 
    29 require_once("class/db/SC_DB_DBFactory_Test.php"); 
    30 require_once("class/db/SC_DB_MasterData_Test.php"); 
    31 require_once("class/helper/SC_Helper_DB_Test.php"); 
    32 require_once("PHPUnit.php"); 
     26require_once("class/page/Page_AllTests.php"); 
     27require_once("class/db/DB_AllTests.php"); 
     28require_once("class/helper/Helper_AllTests.php"); 
     29require_once("PHPUnit/Framework.php"); 
    3330 
    34 $suites = array(); 
    35 $suites[0] = new PHPUnit_TestSuite("LC_Page_Test"); 
    36 $suites[1] = new PHPUnit_TestSuite("SC_DB_DBFactory_Test"); 
    37 $suites[2] = new PHPUnit_TestSuite("SC_DB_MasterData_Test"); 
    38 $suites[3] = new PHPUnit_TestSuite("SC_Helper_DB_Test"); 
     31/** 
     32 * EC-CUBE のテストスイート 
     33 * 
     34 * @author Kentaro Ohkouchi 
     35 * @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $ 
     36 */ 
    3937 
    40 foreach ($suites as $suite) { 
    41     $result = PHPUnit::run($suite); 
    42     print $result->toString(); 
     38class TestSuite { 
     39    public static function suite() { 
     40        $suite = new PHPUnit_Framework_TestSuite('ECCUBE'); 
     41        $suite->addTest(Page_AllTests::suite()); 
     42        $suite->addTest(DB_AllTests::suite()); 
     43        $suite->addTest(Helper_AllTests::suite()); 
     44        return $suite; 
     45    } 
    4346} 
    4447?> 
  • branches/version-2_4-dev/test/class/db/SC_DB_DBFactory_Test.php

    r16582 r18668  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2009 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2323 
    2424// {{{ requires 
    25 require_once($include_dir . "/../data/class/db_extends/SC_DB_DBFactory_Ex.php"); // FIXME 
    26 require_once("PHPUnit/TestCase.php"); 
     25require_once("../html/require.php"); 
     26require_once("../data/class_extends/db_extends/SC_DB_DBFactory_Ex.php"); 
     27require_once("PHPUnit/Framework.php"); 
    2728 
    2829/** 
     
    3334 * @version $Id:SC_DB_DBFactory_Test.php 15532 2007-08-31 14:39:46Z nanasess $ 
    3435 */ 
    35 class SC_DB_DBFactory_Test extends PHPUnit_TestCase { 
     36class SC_DB_DBFactory_Test extends PHPUnit_Framework_TestCase { 
    3637 
    3738    // }}} 
  • branches/version-2_4-dev/test/class/db/SC_DB_MasterData_Test.php

    r16582 r18668  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2009 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2323 
    2424// {{{ requires 
    25 require_once(CLASS_EX_PATH . "db_extends/SC_DB_MasterData_Ex.php"); 
    26 require_once("PHPUnit/TestCase.php"); 
     25require_once("../html/require.php"); 
     26require_once("../data/class_extends/db_extends/SC_DB_MasterData_Ex.php"); 
     27require_once("PHPUnit/Framework.php"); 
    2728 
    2829/** 
     
    3334 * @version $Id:SC_DB_MasterData_Test.php 15532 2007-08-31 14:39:46Z nanasess $ 
    3435 */ 
    35 class SC_DB_MasterData_Test extends PHPUnit_TestCase { 
     36class SC_DB_MasterData_Test extends PHPUnit_Framework_TestCase { 
    3637 
    3738    // }}} 
     
    8889    function testCreateCache() { 
    8990        $masterData = new SC_DB_MasterData_Ex(); 
    90         $datas = $masterData->getDBMasterData("mtb_constants"); 
    91         $commentColumn = array("id", "remarks", "rank"); 
    92         $masterData->clearCache("mtb_constants"); 
     91        $datas = $masterData->getDBMasterData("mtb_constants");  
     92        $commentColumn = array("id", "remarks", "rank");  
     93        $masterData->clearCache("mtb_constants");  
    9394        $masterData->createCache("mtb_constants", $datas, true, 
    94                                          array("id", "remarks", "rank")); 
     95                                 array("id", "remarks", "rank")); 
    9596        $this->assertEquals(true, defined("ECCUBE_VERSION")); 
    9697    } 
  • branches/version-2_4-dev/test/class/helper/SC_Helper_DB_Test.php

    r16582 r18668  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2009 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2323 
    2424// {{{ requires 
    25 // {{{ requires 
    26 require_once($include_dir . "/../data/class/helper_extends/SC_Helper_DB_Ex.php"); // FIXME 
    27 require_once("PHPUnit/TestCase.php"); 
    28  
     25require_once("../html/require.php"); 
     26require_once("../data/class_extends/helper_extends/SC_Helper_DB_Ex.php"); 
     27require_once("PHPUnit/Framework.php"); 
    2928 
    3029/** 
     
    3534 * @version $Id$ 
    3635 */ 
    37 class SC_Helper_DB_Test extends PHPUnit_TestCase { 
     36class SC_Helper_DB_Test extends PHPUnit_Framework_TestCase { 
    3837 
    3938    /** 
     
    5554    function testSfIndexExists() { 
    5655        $objDb = new SC_Helper_DB_Ex(); 
    57         $this->assertEquals(true, $objDb->sfIndexExists("dtb_products", "category_id", 
    58                 "dtb_products_category_id_key")); 
     56        $this->assertEquals(true, $objDb->sfIndexExists("dtb_products", 
     57                                                        "product_id", 
     58                                                        "dtb_products_product_id_key")); 
    5959    } 
    6060} 
  • branches/version-2_4-dev/test/class/page/LC_Page_Test.php

    r16582 r18668  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2009 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2323 
    2424// {{{ requires 
    25 require_once(CLASS_PATH . "pages/LC_Page.php"); 
    26 require_once("PHPUnit/TestCase.php"); 
     25require_once("../html/require.php"); 
     26require_once("../data/class/pages/LC_Page.php"); 
     27require_once("PHPUnit/Framework.php"); 
    2728 
    2829/** 
     
    3334 * @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $ 
    3435 */ 
    35 class LC_Page_Test extends PHPUnit_TestCase { 
     36class LC_Page_Test extends PHPUnit_Framework_TestCase { 
    3637 
    3738    // }}} 
    3839    // {{{ functions 
    3940 
     41    /* 
     42     * FIXME LC_Page::sendRedirect() は, リダイレクトしてしまうため, 
     43     *       PHPUnit3 ではテストできない... 
     44     */ 
     45 
    4046    /** 
    4147     * LC_Page::sendRedirect() のテストケース(エラー). 
    4248     */ 
     49    /* 
    4350    function testSendRedirect() { 
    4451        $objPage = new LC_Page(); 
     
    4754        $this->assertEquals(true, empty($result)); 
    4855    } 
    49  
     56    */ 
    5057    /** 
    5158     * LC_Page::sendRedirect() のテストケース(エラー). 
    5259     */ 
     60    /* 
    5361    function testSendRedirectIsFailed() { 
    5462        $objPage = new LC_Page(); 
     
    5765        $this->assertEquals(false, $result); 
    5866    } 
     67    */ 
    5968 
    6069    /** 
     
    132141    function testGetLocation() { 
    133142        $objPage = new LC_Page(); 
    134         $_SERVER['DOCUMENT_ROOT'] = realpath("../../../html"); 
    135         $url = $objPage->getLocation("../../../html/abouts/index.php"); 
     143        $_SERVER['DOCUMENT_ROOT'] = realpath("../html"); 
     144        $url = $objPage->getLocation("../html/abouts/index.php"); 
    136145 
    137146        $this->assertEquals(SITE_URL . "abouts/index.php", $url); 
     
    147156        $objPage = new LC_Page(); 
    148157        $_SERVER['DOCUMENT_ROOT'] = realpath("../html"); 
    149         $url = $objPage->getLocation("/abouts/index.php"); 
     158        $url = $objPage->getLocation(URL_DIR . 'abouts/index.php'); 
    150159 
    151160        $this->assertEquals(SITE_URL . "abouts/index.php", $url); 
     
    160169    function testGetLocationWithQueryString() { 
    161170        $objPage = new LC_Page(); 
    162         $_SERVER['DOCUMENT_ROOT'] = realpath("../../../html"); 
     171        $_SERVER['DOCUMENT_ROOT'] = realpath("../html"); 
    163172 
    164173        $queryString = array("mode" => "update", "type" => "text"); 
    165         $url = $objPage->getLocation("../../../html/abouts/index.php", $queryString); 
     174        $url = $objPage->getLocation("../html/abouts/index.php", $queryString); 
    166175 
    167176        $this->assertEquals(SITE_URL . "abouts/index.php?mode=update&type=text", $url); 
     
    176185    function testGetLocationUseSSL() { 
    177186        $objPage = new LC_Page(); 
    178         $_SERVER['DOCUMENT_ROOT'] = realpath("../../../html"); 
     187        $_SERVER['DOCUMENT_ROOT'] = realpath("../html"); 
    179188 
    180189        $queryString = array("mode" => "update", "type" => "text"); 
    181         $url = $objPage->getLocation("../../../html/abouts/index.php", $queryString, true); 
     190        $url = $objPage->getLocation("../html/abouts/index.php", $queryString, true); 
    182191 
    183192        $this->assertEquals(SSL_URL . "abouts/index.php?mode=update&type=text", $url); 
     
    192201    function testGetLocationWithDocumentRoot() { 
    193202        $objPage = new LC_Page(); 
    194         $documentRoot = realpath("../../../html"); 
     203        $documentRoot = realpath("../html"); 
    195204 
    196205        $queryString = array("mode" => "update", "type" => "text"); 
    197         $url = $objPage->getLocation("../../../html/abouts/index.php", array(), 
     206        $url = $objPage->getLocation("../html/abouts/index.php", array(), 
    198207                                     false, $documentRoot); 
    199208 
Note: See TracChangeset for help on using the changeset viewer.