Skip to content

Commit

Permalink
Fixing some tests on ShellDispatcher to make them run on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Jun 20, 2011
1 parent 08c72a6 commit 0cc76b3
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions lib/Cake/Test/Case/Console/ShellDispatcherTest.php
Expand Up @@ -154,8 +154,8 @@ public function testParseParams() {
$expected = array(
'app' => 'new',
'webroot' => 'webroot',
'working' => '/var/www/htdocs/new',
'root' => '/var/www/htdocs'
'working' => str_replace('/', DS, '/var/www/htdocs/new'),
'root' => str_replace('/', DS,'/var/www/htdocs')
);
$Dispatcher->parseParams($params);
$this->assertEqual($expected, $Dispatcher->params);
Expand All @@ -164,8 +164,8 @@ public function testParseParams() {
$expected = array(
'app' => 'app',
'webroot' => 'webroot',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH)),
);
$Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params);
Expand All @@ -179,8 +179,8 @@ public function testParseParams() {
$expected = array(
'app' => 'new',
'webroot' => 'webroot',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH))
);
$Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params);
Expand All @@ -198,8 +198,8 @@ public function testParseParams() {
$expected = array(
'app' => 'new',
'webroot' => 'webroot',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH))
);

$Dispatcher->params = $Dispatcher->args = array();
Expand All @@ -217,8 +217,8 @@ public function testParseParams() {
$expected = array(
'app' => 'new',
'webroot' => 'webroot',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH))
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH))
);
$Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params);
Expand All @@ -235,8 +235,8 @@ public function testParseParams() {
);
$expected = array(
'app' => 'new',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'new'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH)),
'webroot' => 'webroot'
);
$Dispatcher->params = $Dispatcher->args = array();
Expand All @@ -258,8 +258,8 @@ public function testParseParams() {
$expected = array(
'app' => 'app',
'webroot' => 'webroot',
'working' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
'root' => str_replace('\\', '/', dirname(CAKE_CORE_INCLUDE_PATH)),
'working' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH) . DS . 'app'),
'root' => str_replace('\\', DS, dirname(CAKE_CORE_INCLUDE_PATH)),
);
$Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params);
Expand All @@ -284,8 +284,8 @@ public function testParseParams() {
$expected = array(
'app' => 'app',
'webroot' => 'webroot',
'working' => '/cake/1.2.x.x/app',
'root' => '/cake/1.2.x.x',
'working' => str_replace('/', DS, '/cake/1.2.x.x/app'),
'root' => str_replace('/', DS, '/cake/1.2.x.x'),
);
$Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params);
Expand Down Expand Up @@ -375,9 +375,9 @@ public function testParseParams() {
'my_app',
);
$expected = array(
'working' => 'D:\www',
'working' => 'D:\\\\www',
'app' => 'www',
'root' => 'D:',
'root' => 'D:\\',
'webroot' => 'webroot'
);

Expand Down

0 comments on commit 0cc76b3

Please sign in to comment.