Наследование: implements Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
Пример #1
0
 /**
  * Tests processing the pass without the JSON file.
  */
 public function testFileNotFound()
 {
     $pass = new AddPackagesPass($this->getRootDir() . '/vendor/composer/invalid.json');
     $container = new ContainerBuilder();
     $pass->process($container);
     $this->assertTrue($container->hasParameter('kernel.packages'));
     $packages = $container->getParameter('kernel.packages');
     $this->assertInternalType('array', $packages);
     $this->assertEmpty($container->getParameter('kernel.packages'));
 }