Exemple #1
0
 /**
  * @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;
 }
Exemple #2
0
 /**
  * @expectedException Exception
  */
 public function testRender_BandFont()
 {
     $figlet = new Figlet();
     $figlet->setFontDir(__DIR__ . '/font/')->setFont('badfile');
     $figlet->render('Test');
 }