/**
  * Test related method
  */
 public function testLoad()
 {
     $this->extension->load($this->configs, $this->containerBuilder);
     $serviceIds = $this->containerBuilder->getServiceIds();
     $this->assertCount(3, $serviceIds);
     $this->assertTrue(in_array(self::PIM_TRANSLATION_FORM_TYPE, $serviceIds));
 }
 /**
  * Test related method
  */
 public function testLoad()
 {
     $this->extension->load($this->configs, $this->containerBuilder);
     $this->assertGreaterThanOrEqual(1, $this->containerBuilder->getServiceIds());
 }
 /**
  * @param Extension        $extension
  * @param ContainerBuilder $container
  *
  * @return void
  */
 private function loadExtension(Extension $extension, ContainerBuilder $container)
 {
     if (!$container->getExtensionConfig($extension->getAlias())) {
         $extension->load([], $container);
     }
 }
Example #4
0
 /**
  * Loads provided extension using a mocked container so that the definitions and parameters could be verified later.
  *
  * @param \Symfony\Component\HttpKernel\DependencyInjection\Extension $extension
  * @param array $config An optional array of configuration values
  * @return $this
  */
 protected function loadExtension(Extension $extension, $config = [])
 {
     $extension->load($config, $this->getContainerMock());
     return $this;
 }