Skip to content

Commit

Permalink
Update tests for changed 3.0 directory names.
Browse files Browse the repository at this point in the history
In 3.0 `app` was renamed to `App`. This needed to be updated in the
tests as path segments are case sensitive.
  • Loading branch information
markstory committed Jul 10, 2013
1 parent f8a72c9 commit 0c78675
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/Cake/Test/TestCase/Network/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1206,8 +1206,8 @@ public function testBaseUrlwithModRewriteAlias() {
* @link https://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/3318
*/
public function testBaseUrlWithModRewriteAndIndexPhp() {
$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php';
$_SERVER['PHP_SELF'] = '/cakephp/app/webroot/index.php';
$_SERVER['REQUEST_URI'] = '/cakephp/App/webroot/index.php';

This comment has been minimized.

Copy link
@ADmad

ADmad Jul 10, 2013

Member

Doh, I didn't realize this obvious fix when merging 😛

This comment has been minimized.

Copy link
@markstory

markstory Jul 10, 2013

Author Member

Don't worry I've had to do this a few times.

$_SERVER['PHP_SELF'] = '/cakephp/App/webroot/index.php';
unset($_SERVER['PATH_INFO']);
$request = Request::createFromGlobals();

Expand All @@ -1216,8 +1216,8 @@ public function testBaseUrlWithModRewriteAndIndexPhp() {
$this->assertEquals('', $request->url);
$this->assertEquals('/cakephp/', $request->here);

$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php/';
$_SERVER['PHP_SELF'] = '/cakephp/app/webroot/index.php/';
$_SERVER['REQUEST_URI'] = '/cakephp/App/webroot/index.php/';
$_SERVER['PHP_SELF'] = '/cakephp/App/webroot/index.php/';
$_SERVER['PATH_INFO'] = '/';
$request = Request::createFromGlobals();

Expand All @@ -1226,8 +1226,8 @@ public function testBaseUrlWithModRewriteAndIndexPhp() {
$this->assertEquals('', $request->url);
$this->assertEquals('/cakephp/', $request->here);

$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php/apples';
$_SERVER['PHP_SELF'] = '/cakephp/app/webroot/index.php/apples';
$_SERVER['REQUEST_URI'] = '/cakephp/App/webroot/index.php/apples';
$_SERVER['PHP_SELF'] = '/cakephp/App/webroot/index.php/apples';
$_SERVER['PATH_INFO'] = '/apples';
$request = Request::createFromGlobals();

Expand All @@ -1236,8 +1236,8 @@ public function testBaseUrlWithModRewriteAndIndexPhp() {
$this->assertEquals('apples', $request->url);
$this->assertEquals('/cakephp/apples', $request->here);

$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php/melons/share/';
$_SERVER['PHP_SELF'] = '/cakephp/app/webroot/index.php/melons/share/';
$_SERVER['REQUEST_URI'] = '/cakephp/App/webroot/index.php/melons/share/';
$_SERVER['PHP_SELF'] = '/cakephp/App/webroot/index.php/melons/share/';
$_SERVER['PATH_INFO'] = '/melons/share/';
$request = Request::createFromGlobals();

Expand All @@ -1246,8 +1246,8 @@ public function testBaseUrlWithModRewriteAndIndexPhp() {
$this->assertEquals('melons/share/', $request->url);
$this->assertEquals('/cakephp/melons/share/', $request->here);

$_SERVER['REQUEST_URI'] = '/cakephp/app/webroot/index.php/bananas/eat/tasty_banana';
$_SERVER['PHP_SELF'] = '/cakephp/app/webroot/index.php/bananas/eat/tasty_banana';
$_SERVER['REQUEST_URI'] = '/cakephp/App/webroot/index.php/bananas/eat/tasty_banana';
$_SERVER['PHP_SELF'] = '/cakephp/App/webroot/index.php/bananas/eat/tasty_banana';
$_SERVER['PATH_INFO'] = '/bananas/eat/tasty_banana';
$request = Request::createFromGlobals();

Expand Down

0 comments on commit 0c78675

Please sign in to comment.