Ignore:
Timestamp:
2010/07/20 13:25:33 (14 years ago)
Author:
kajiwara
Message:

EC-CUBE Ver2.4.4 分コミット。詳細はこちら( http://www.ec-cube.net/release/detail.php?release_id=223

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/class/page/LC_Page_Test.php

    r16582 r18758  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2010 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.