Exemple #1
0
 /**
  * @param \Spryker\Zed\Kernel\Dependency\Injector\DependencyInjector $dependencyInjector
  * @param \Spryker\Zed\Kernel\Container $container
  *
  * @return \Spryker\Shared\Kernel\ContainerInterface|\Spryker\Zed\Kernel\Container
  */
 protected function injectExternalDependencies(DependencyInjector $dependencyInjector, Container $container)
 {
     $container = $dependencyInjector->injectBusinessLayerDependencies($container);
     $container = $dependencyInjector->injectCommunicationLayerDependencies($container);
     $container = $dependencyInjector->injectPersistenceLayerDependencies($container);
     return $container;
 }
 /**
  * @return void
  */
 public function testInjectCommunicationLayerDependenciesShouldCallMethodOfRegisteredDependencyInjector()
 {
     $dependencyInjectorCollection = new DependencyInjectorCollection();
     $abstractDependencyInjectorMock = $this->getAbstractDependencyInjectorMock();
     $abstractDependencyInjectorMock->expects($this->once())->method('injectCommunicationLayerDependencies');
     $dependencyInjectorCollection->addDependencyInjector($abstractDependencyInjectorMock);
     $dependencyInjector = new DependencyInjector($dependencyInjectorCollection);
     $dependencyInjector->injectCommunicationLayerDependencies(new Container());
 }
 /**
  * @param \Spryker\Zed\Kernel\Dependency\Injector\DependencyInjector $dependencyInjector
  * @param \Spryker\Zed\Kernel\Container $container
  *
  * @return \Spryker\Shared\Kernel\ContainerInterface
  */
 protected function injectExternalDependencies(DependencyInjector $dependencyInjector, Container $container)
 {
     return $dependencyInjector->injectCommunicationLayerDependencies($container);
 }