mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-06 03:22:39 +00:00
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:
parent
9f80004920
commit
d9e8b3b6a2
2 changed files with 20 additions and 2 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue