Skip to content

Commit

Permalink
Vanishing FULL_BASE_URL from the RouterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 9, 2013
1 parent bddd0cb commit 4bbccaf
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/Cake/Test/TestCase/Routing/RouterTest.php
Expand Up @@ -27,10 +27,6 @@
use Cake\Routing\Route\Route;
use Cake\TestSuite\TestCase;

if (!defined('FULL_BASE_URL')) {
define('FULL_BASE_URL', 'http://cakephp.org');
}

/**
* RouterTest class
*
Expand All @@ -47,6 +43,8 @@ public function setUp() {
parent::setUp();
Configure::write('Routing', array('admin' => null, 'prefixes' => array()));
Router::reload();
Router::baseURL('');
Configure::write('App.fullBaseURL', 'http://localhost');
}

/**
Expand All @@ -70,7 +68,6 @@ public function testFullBaseURL() {
$this->assertRegExp('/^http(s)?:\/\//', Router::url('/', true));
$this->assertRegExp('/^http(s)?:\/\//', Router::url(null, true));
$this->assertRegExp('/^http(s)?:\/\//', Router::url(array('_full' => true)));
$this->assertSame(FULL_BASE_URL . '/', Router::url(array('_full' => true)));
}

/**
Expand All @@ -79,7 +76,6 @@ public function testFullBaseURL() {
* @return void
*/
public function testBaseURL() {
$this->assertEquals(FULL_BASE_URL, Router::baseUrl());
Router::baseURL('http://example.com');
$this->assertEquals('http://example.com/', Router::url('/', true));
$this->assertEquals('http://example.com', Configure::read('App.fullBaseURL'));
Expand Down Expand Up @@ -2438,7 +2434,7 @@ public function testUrlProtocol() {
$this->assertEquals($url, Router::url($url));
$url = '/posts/index#here';

$expected = FULL_BASE_URL . '/posts/index#here';
$expected = Configure::read('App.fullBaseURL') . '/posts/index#here';
$this->assertEquals($expected, Router::url($url, true));
}

Expand Down

0 comments on commit 4bbccaf

Please sign in to comment.