Skip to content

Commit

Permalink
Use Request::env() instead of overriding globals.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 11, 2014
1 parent df28a0d commit 80381bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/TestCase/Routing/RouterTest.php
Expand Up @@ -1713,9 +1713,9 @@ public function testUrlGenerationWithAutoPrefixes() {
*/
public function testGenerationWithSslOption() {
Router::connect('/:controller/:action/*');
$_SERVER['HTTP_HOST'] = 'localhost';

$request = new Request();
$request->env('HTTP_HOST', 'localhost');
Router::pushRequest(
$request->addParams(array(
'plugin' => null, 'controller' => 'images', 'action' => 'index'
Expand Down Expand Up @@ -1744,10 +1744,10 @@ public function testGenerationWithSslOption() {
*/
public function testGenerateWithSslInSsl() {
Router::connect('/:controller/:action/*');
$_SERVER['HTTP_HOST'] = 'localhost';
$_SERVER['HTTPS'] = 'on';

$request = new Request();
$request->env('HTTP_HOST', 'localhost');
$request->env('HTTPS', 'on');
Router::pushRequest(
$request->addParams(array(
'plugin' => null,
Expand Down

0 comments on commit 80381bc

Please sign in to comment.