source: branches/version-2_12-dev/tests/class/util/SC_Utils/SC_Utils_isAppInnerUrlTest.php @ 22202

Revision 22202, 2.5 KB checked in by shift_hiroko.tamagawa, 11 years ago (diff)

#1977 #1978 単体テストのファイルにコピーライトを追記、定数が邪魔をしてテストできない箇所をいったんコメントアウト

  • Property svn:keywords set to Id Rev Date
Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4// テスト用に定数を定義
5define('HTTP_URL', 'http://sample.eccube.jp/');
6define('HTTPS_URL', 'https://sample.eccube.jp/');
7require_once($HOME . "/tests/class/Common_TestCase.php");
8/*
9 * This file is part of EC-CUBE
10 *
11 * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved.
12 *
13 * http://www.lockon.co.jp/
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28 */
29
30/**
31 * SC_Utils::isAppInnerUrl()のテストクラス.
32 * TODO まとめて実行する場合は定数の変更ができないためNG
33 *
34 * @author Hiroko Tamagawa
35 * @version $Id$
36 */
37class SC_Utils_isAppInnerUrlTest extends Common_TestCase {
38
39
40  protected function setUp() {
41    // parent::setUp();
42  }
43
44  protected function tearDown() {
45    // parent::tearDown();
46  }
47
48  /////////////////////////////////////////
49  /**
50  public function testIsAppInnerUrl_非SSLかつアプリ内URLの場合_trueが返る() {
51    $input = 'http://sample.eccube.jp/admin/';
52    $this->expected = true;
53    $this->actual = SC_Utils::isAppInnerUrl($input);
54
55    $this->verify();
56  }
57
58  public function testIsAppInnerUrl_非SSLかつアプリ外URLの場合_falseが返る() {
59    $input = 'http://outside.eccube.jp/admin/';
60    $this->expected = false;
61    $this->actual = SC_Utils::isAppInnerUrl($input);
62
63    $this->verify();
64  }
65
66  public function testIsAppInnerUrl_SSLかつアプリ内URLの場合_trueが返る() {
67    $input = 'https://sample.eccube.jp/admin/';
68    $this->expected = true;
69    $this->actual = SC_Utils::isAppInnerUrl($input);
70
71    $this->verify();
72  }
73
74  public function testIsAppInnerUrl_SSLかつアプリ外URLの場合_falseが返る() {
75    $input = 'https://outside.eccube.jp/admin/';
76    $this->expected = false;
77    $this->actual = SC_Utils::isAppInnerUrl($input);
78
79    $this->verify();
80  }
81  */
82
83  //////////////////////////////////////////
84
85}
86
Note: See TracBrowser for help on using the repository browser.