Exemplo n.º 1
0
 public function testFactory()
 {
     $layoutCollectorFactory = new LayoutCollectorFactory();
     $serviceManager = new ServiceManager();
     $serviceManager->setService('ConLayout\\Updater\\LayoutUpdaterInterface', new LayoutUpdater());
     $serviceManager->setService('ConLayout\\Layout\\LayoutInterface', new Layout(new BlockFactory(), new LayoutUpdater()));
     $instance = $layoutCollectorFactory->createService($serviceManager);
     $this->assertInstanceOf('ConLayout\\Zdt\\Collector\\LayoutCollector', $instance);
 }
Exemplo n.º 2
0
 public function testFactory()
 {
     $layoutCollectorFactory = new LayoutCollectorFactory();
     $serviceManager = new ServiceManager();
     $serviceManager->setService(LayoutUpdaterInterface::class, new LayoutUpdater());
     $serviceManager->setService(LayoutInterface::class, new Layout($this->layoutUpdater, $this->blockPool));
     $serviceManager->setService('ViewResolver', new AggregateResolver());
     $instance = $layoutCollectorFactory->createService($serviceManager);
     $this->assertInstanceOf(LayoutCollector::class, $instance);
 }