Parsing every parameter until there is no more. Good to have alias but with the ability to override the arguments.

This commit is contained in:
Renan Gonçalves 2011-10-21 12:20:31 +02:00
parent 9f80004920
commit d9e8b3b6a2
2 changed files with 20 additions and 2 deletions

View file

@ -365,6 +365,25 @@ class ShellDispatcherTest extends CakeTestCase {
$Dispatcher->parseParams($params);
$this->assertEqual($expected, $Dispatcher->params);
$params = array(
'/cake/1.2.x.x/cake/console/cake.php',
'bake',
'-app',
'new',
'-app',
'old',
'-working',
'/var/www/htdocs'
);
$expected = array(
'app' => 'old',
'webroot' => 'webroot',
'working' => str_replace('/', DS, '/var/www/htdocs/old'),
'root' => str_replace('/', DS,'/var/www/htdocs')
);
$Dispatcher->parseParams($params);
$this->assertEqual($expected, $Dispatcher->params);
if (DS === '\\') {
$params = array(
'cake.php',