public function testmanageArguments()
{
$application = $this->getApplication();
$application->add(new DummyCommand());
$command = $application->find('category:create:dummy');
$dialog = $this->getMock('Symfony\\Component\\Console\\Helper\\QuestionHelper', array('ask'));
// ASK - store-id
$dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue(1));
// ASK - children-categories-number
$dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue(0));
// ASK - category-name-prefix
$dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue('My Awesome Category '));
// ASK - category-number
$dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue(0));
// We override the standard helper with our mock
$command->getHelperSet()->set($dialog, 'dialog');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName()));
$arguments = $commandTester->getInput()->getArguments();
$this->assertArrayHasKey('store-id', $arguments);
$this->assertArrayHasKey('children-categories-number', $arguments);
$this->assertArrayHasKey('category-name-prefix', $arguments);
$this->assertArrayHasKey('category-number', $arguments);
}