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
*/
public function testNl() {
$newLine = '\n';
$newLine = "\n";
if (DS === '\\') {
$newLine = "\r\n";
}

View file

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