Exemple #1
0
 /**
  * @covers ::__construct
  */
 public function setUp()
 {
     parent::setUp();
     $this->contextHandler = $this->prophesize(ContextHandlerInterface::class);
     $this->entityType = $this->prophesize(EntityTypeInterface::class);
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $module_handler->invokeAll(Argument::cetera())->willReturn([]);
     $this->pageAccess = new PageAccess($this->entityType->reveal(), $this->contextHandler->reveal());
     $this->pageAccess->setModuleHandler($module_handler->reveal());
 }
 public function setUp()
 {
     $this->account = $this->prophesize(AccountInterface::class);
     $this->contextHandler = $this->prophesize(ContextHandlerInterface::class);
     $this->uuidGenerator = $this->prophesize(UuidInterface::class);
     $this->token = $this->prophesize(Token::class);
     $this->builderManager = $this->prophesize(DisplayBuilderManagerInterface::class);
     $this->layoutManager = $this->prophesize(LayoutPluginManagerInterface::class);
     $this->layout = $this->prophesize(LayoutInterface::class);
     $this->layoutManager->createInstance(Argument::type('string'), Argument::type('array'))->willReturn($this->layout->reveal());
     $this->variant = new PanelsDisplayVariant([], '', [], $this->contextHandler->reveal(), $this->account->reveal(), $this->uuidGenerator->reveal(), $this->token->reveal(), $this->builderManager->reveal(), $this->layoutManager->reveal());
 }
 /**
  * @covers ::__construct
  */
 public function setUp()
 {
     parent::setUp();
     $this->contextHandler = $this->prophesize(ContextHandlerInterface::class);
     $this->entityType = $this->prophesize(EntityTypeInterface::class);
     $module_handler = $this->prophesize(ModuleHandlerInterface::class);
     $module_handler->invokeAll(Argument::cetera())->willReturn([]);
     $this->pageAccess = new PageAccess($this->entityType->reveal(), $this->contextHandler->reveal());
     $this->pageAccess->setModuleHandler($module_handler->reveal());
     $this->cacheContextsManager = $this->prophesize(CacheContextsManager::class);
     $container = new ContainerBuilder();
     $container->set('cache_contexts_manager', $this->cacheContextsManager->reveal());
     \Drupal::setContainer($container);
 }