Changeset 23524


Ignore:
Timestamp:
2014/06/04 23:21:54 (10 years ago)
Author:
shutta
Message:

#2571 テスト> SC_Utils_isInternalDomainTestの改修
一致する場合のテストのURLは、設定情報のURLを利用するように改良。
「testsfIsInternalDomain_ドメインが一致しない場合_falseが返る」のテストが間違っているのを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/tests/class/util/SC_Utils/SC_Utils_isInternalDomainTest.php

    r22857 r23524  
    2727/** 
    2828 * SC_Utils::sfIsInternalDomain()のテストクラス. 
    29  * HTTP_URL='http://test.local' という前提でテスト. 
    3029 * 
    3130 * @author Hiroko Tamagawa 
     
    4948  public function testsfIsInternalDomain_ドメインが一致する場合_trueが返る() 
    5049  { 
    51     $url = 'http://test.local/html/index.php'; 
    52     $this->expected = TRUE; 
     50    $url = HTTP_URL . 'index.php'; 
     51    $this->expected = true; 
    5352    $this->actual = SC_Utils::sfIsInternalDomain($url); 
    5453 
     
    5857  public function testsfIsInternalDomain_アンカーを含むURLの場合_trueが返る() 
    5958  { 
    60     $url = 'http://test.local/html/index.php#hoge'; 
    61     $this->expected = TRUE; 
     59    $url = HTTP_URL . 'index.php#hoge'; 
     60    $this->expected = true; 
    6261    $this->actual = SC_Utils::sfIsInternalDomain($url); 
    6362 
     
    6766  public function testsfIsInternalDomain_ドメインが一致しない場合_falseが返る() 
    6867  { 
    69     $url = 'http://test.local.jp/html/index.php'; 
    70     $this->expected = TRUE; 
     68    // 一致しないようなURLにする 
     69    $url = 'http://unmatched.example.jp/html/index.php'; 
     70 
     71    $this->expected = false; 
    7172    $this->actual = SC_Utils::sfIsInternalDomain($url); 
    7273 
Note: See TracChangeset for help on using the changeset viewer.