public function testRequiredOptionsThrowExceptionIfNotSet($param, $prompt)
{
$command = $this->getApplication()->find('local-config:generate');
$options = array('command' => $command->getName(), 'db-host' => 'my_db_host', 'db-user' => 'my_db_user', 'db-pass' => 'my_db_pass', 'db-name' => 'my_db_name', 'session-save' => 'my_session_save', 'admin-frontname' => 'my_admin_frontname', 'encryption-key' => 'key123456789');
unset($options[$param]);
$dialog = $this->getMock('Symfony\\Component\\Console\\Helper\\DialogHelper', array('ask'));
$dialog->expects($this->once())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Output\\StreamOutput'), sprintf('<question>Please enter the %s:</question>', $prompt))->will($this->returnValue(null));
$command->getHelperSet()->set($dialog, 'dialog');
$this->setExpectedException('InvalidArgumentException', sprintf('%s was not set', $param));
$commandTester = new CommandTester($command);
$commandTester->execute($options);
}