/** * @inheritdoc */ protected function execute(InputInterface $input, OutputInterface $output) { $figlet = new Figlet(); $figlet->setFont($input->getOption('font')); if (null !== $input->getOption('color')) { $figlet->setFontColor($input->getOption('color')); } if (null !== $input->getOption('bg-color')) { $figlet->setBackgroundColor($input->getOption('bg-color')); } if (null !== $input->getOption('stretching')) { $figlet->setFontStretching($input->getOption('stretching')); } $output->write($figlet->render($input->getArgument('text'))); return 0; }
/** * @expectedException InvalidArgumentException */ public function testRender_UndefinedBackgroundColor() { $figlet = new Figlet(); $figlet->setBackgroundColor('bright_light_gray'); $figlet->render('Test'); }