예제 #1
0
 public function testProcessing()
 {
     $config = new Configuration();
     $config->setImagine($this->getImagine());
     $config->setColor($this->getColor());
     $config->setImage(sprintf('%s/flags.png', $this->path));
     $config->setStylesheet(sprintf('%s/flags.css', $this->path));
     $config->setSelector(".flag.{{filename}}{background-position:{{x}}px {{y}}px}\n");
     $config->getFinder()->name('*.png')->in(__DIR__ . '/../Fixtures/flags')->sortByName();
     $processor = new DynamicProcessor();
     $processor->process($config);
     $sprite = $config->getImagine()->open($config->getImage());
     $result = $config->getImagine()->open(__DIR__ . '/../Fixtures/results/flags.png');
     $this->assertImageEquals($sprite, $result);
     $this->assertFileEquals(__DIR__ . '/../Fixtures/results/flags.css', $config->getStylesheet());
 }
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $processor = new DynamicProcessor();
     $processor->process($this->getConfiguration($input));
 }