/** * @expectedException InvalidArgumentException * @expectedExceptionMessageRegExp /The "\w+" option is not specified and not found in the config "sugarcrm\.\w+"/ */ public function testWrongDefaultOptionsOptionNotFound() { $cmd_name = 'test:default'; $config = new Config(array(__DIR__ . '/../yaml/empty.yaml')); $config->load(); $app = new Application(); $app->configure(); $app->setAutoExit(false); $app->getContainer()->set('config', $config); $app->add(new TestConfigOptionCommand($cmd_name)); $command = $app->find($cmd_name); $commandTester = new CommandTester($command); $commandTester->execute(array('command' => $cmd_name)); }
/** * @expectedException \SugarCli\Console\ConfigException */ public function testNoLoad() { $config = new Config(); $config->get(); }