public function testCliParameters()
{
$this->specify("CLI Dispatcher doesn't work with custom parameters", function () {
$di = new CliFactoryDefault();
$dispatcher = new Dispatcher();
$di->setShared("dispatcher", $dispatcher);
$dispatcher->setDI($di);
// Test $this->dispatcher->getParams()
$dispatcher->setTaskName('params');
$dispatcher->setActionName('params');
$dispatcher->setParams(array('This', 'Is', 'An', 'Example'));
$dispatcher->dispatch();
expect($dispatcher->getReturnedValue())->equals('$params is the same as $this->dispatcher->getParams()');
// Test $this->dispatcher->getParam()
$dispatcher->setTaskName('params');
$dispatcher->setActionName('param');
$dispatcher->setParams(array('This', 'Is', 'An', 'Example'));
$dispatcher->dispatch();
expect($dispatcher->getReturnedValue())->equals('$param[0] is the same as $this->dispatcher->getParam(0)');
});
}