Esempio n. 1
0
 protected function outputTheme(OutputInterface $output, Theme $theme, $isActive)
 {
     if ($isActive) {
         $output->writeln(sprintf('<comment>%s</comment> (active)', $theme->getName()));
     } else {
         $output->writeln(sprintf('<comment>%s</comment>', $theme->getName()));
     }
     if ($theme->getLabel()) {
         $output->writeln(sprintf(' - <info>label:</info> %s', $theme->getLabel()));
     }
     if ($theme->getLogo()) {
         $output->writeln(sprintf(' - <info>logo:</info> %s', $theme->getLogo()));
     }
     if ($theme->getIcon()) {
         $output->writeln(sprintf(' - <info>icon:</info> %s', $theme->getIcon()));
     }
     if ($theme->getScreenshot()) {
         $output->writeln(sprintf(' - <info>screenshot:</info> %s', $theme->getScreenshot()));
     }
     if ($theme->getStyles()) {
         if (count($theme->getStyles()) > 1) {
             $output->writeln(' - <info>styles:</info>');
             foreach ($theme->getStyles() as $style) {
                 $output->writeln(sprintf('     - %s', $style));
             }
         } else {
             $output->writeln(sprintf(' - <info>styles:</info> %s', current($theme->getStyles())));
         }
     }
 }
Esempio n. 2
0
 public function testGetNameAndConstructor()
 {
     $this->assertEquals('test', $this->theme->getName());
 }