/**
  * Verifies that we can retrieve the supported processors.
  *
  * @covers ::resolve
  */
 public function testResolveSupportedFileTypes()
 {
     // get the supported processors for each file type
     $php = $this->resolver->resolve('test.php');
     $png = $this->resolver->resolve('test.png');
     // make sure we get the exact processors we put in for each type
     self::assertCount(2, $php);
     self::assertContains($this->phpProcessorA, $php);
     self::assertContains($this->phpProcessorA, $php);
     self::assertCount(1, $png);
 }
Пример #2
0
 /**
  * Registers the processor subscriber if processors are available.
  *
  * @return BuildCommand For method chaining.
  */
 private function registerProcessors()
 {
     if (0 < count($this->resolver->getProcessors())) {
         $this->dispatcher->addSubscriber(new ProcessorSubscriber(new DelegatingProcessor($this->resolver)));
     }
     return $this;
 }