Fixing a couple of recently broken tests

This commit is contained in:
Jose Lorenzo Rodriguez 2011-06-23 13:41:10 -07:00
parent 5035bb99f8
commit 1814b06695
2 changed files with 19 additions and 17 deletions

View file

@ -344,7 +344,7 @@ class ShellTest extends CakeTestCase {
* @return void * @return void
*/ */
public function testNl() { public function testNl() {
$newLine = '\n'; $newLine = "\n";
if (DS === '\\') { if (DS === '\\') {
$newLine = "\r\n"; $newLine = "\r\n";
} }

View file

@ -367,23 +367,25 @@ class ShellDispatcherTest extends CakeTestCase {
$Dispatcher->parseParams($params); $Dispatcher->parseParams($params);
$this->assertEqual($expected, $Dispatcher->params); $this->assertEqual($expected, $Dispatcher->params);
$params = array( if (DS === '\\') {
'cake.php', $params = array(
'-working', 'cake.php',
'D:\www', '-working',
'bake', 'D:\www',
'my_app', 'bake',
); 'my_app',
$expected = array( );
'working' => 'D:\\\\www', $expected = array(
'app' => 'www', 'working' => 'D:\\\\www',
'root' => 'D:\\', 'app' => 'www',
'webroot' => 'webroot' 'root' => 'D:\\',
); 'webroot' => 'webroot'
);
$Dispatcher->params = $Dispatcher->args = array(); $Dispatcher->params = $Dispatcher->args = array();
$Dispatcher->parseParams($params); $Dispatcher->parseParams($params);
$this->assertEqual($expected, $Dispatcher->params); $this->assertEqual($expected, $Dispatcher->params);
}
} }
/** /**