protected function setUp() { parent::setUp(); $this->prepareWebspaceManager(); $this->requestStack = $this->prophesize(RequestStack::class); $this->resolver = new RequestAnalyzerResolver($this->webspaceManager->reveal(), $this->requestStack->reveal(), 'dev', ['analyticsKey' => 'UA-SULU-Test']); }
public function setUp() { parent::setUp(); $this->webspaceManager = $this->prophesize('Sulu\\Component\\Webspace\\Manager\\WebspaceManagerInterface'); $this->loaderResolver = $this->prophesize('Symfony\\Component\\Config\\Loader\\LoaderResolverInterface'); $this->loader = $this->prophesize('Symfony\\Component\\Config\\Loader\\LoaderInterface'); $this->portalLoader = new PortalLoader($this->webspaceManager->reveal(), 'dev'); $this->portalLoader->setResolver($this->loaderResolver->reveal()); }
public function setUp() { parent::setUp(); $this->webspaceManager = $this->prophesize(WebspaceManagerInterface::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->registry = $this->prophesize(DocumentRegistry::class); $this->document = $this->prophesize(StructureBehavior::class)->willImplement(WebspaceBehavior::class); $this->webspace = $this->prophesize(Webspace::class); $this->localization1 = $this->prophesize(Localization::class); $this->localization2 = $this->prophesize(Localization::class); $this->subscriber = new FallbackLocalizationSubscriber($this->encoder->reveal(), $this->inspector->reveal(), $this->registry->reveal(), new LocalizationFinder($this->webspaceManager->reveal())); $this->hydrateEvent->getNode()->willReturn($this->node->reveal()); $this->hydrateEvent->getDocument()->willReturn($this->document->reveal()); $this->hydrateEvent->getLocale()->willReturn(self::FIX_LOCALE); $this->webspaceManager->findWebspaceByKey(self::FIX_WEBSPACE)->willReturn($this->webspace); $this->registry->getDefaultLocale()->willReturn('de'); }