public function testStopProcessing()
 {
     $container = new Container(new LibraryCollection());
     $collection = new CompilerPassCollection();
     $collection->addCompiler(new DummyCompilerPass('definition-x', true), 100);
     $collection->addCompiler(new DummyCompilerPass('definition-y'), 500);
     $collection->addCompiler(new DummyCompilerPass('definition-z'), -500);
     $result = $collection->process($container);
     $this->assertInstanceOf(CompilerPassResult::class, $result);
     $this->assertTrue($result->isProcessingStopped());
     $definitions = [];
     /**
      * @var LibraryDefinitionInterface $definition
      */
     foreach ($result->getContainer()->getLibraries()->getDefinitions() as $definition) {
         $definitions[] = $definition->getName();
     }
     $this->assertSame(array('definition-z', 'definition-x'), $definitions);
 }
 /**
  * {@inheritdoc}
  */
 public function compile(ContainerInterface $container)
 {
     return $this->compilers->process($container);
 }