/** * {@inheritdoc} */ protected function setUp() { $this->documentManager = $this->prophesize(DocumentManager::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->searchManager = $this->prophesize(SearchManagerInterface::class); $this->baseMetadataFactory = $this->prophesize(BaseMetadataFactory::class); $this->reindexListener = new ReindexListener($this->documentManager->reveal(), $this->inspector->reveal(), $this->searchManager->reveal(), $this->baseMetadataFactory->reveal(), $this->mapping); }
public function setUp() { $this->factory = $this->prophesize(StructureMetadataFactory::class); $this->extensionManager = $this->prophesize(ExtensionManager::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->structure = $this->prophesize(StructureMetadata::class); $this->extension = $this->prophesize(ExtensionInterface::class); $this->propertyFactory = $this->prophesize(LegacyPropertyFactory::class); $typemap = ['page' => '\\Sulu\\Component\\Content\\Compat\\Structure\\PageBridge', 'home' => '\\Sulu\\Component\\Content\\Compat\\Structure\\PageBridge', 'snippet' => '\\Sulu\\Component\\Content\\Compat\\Structure\\SnippetBridge']; $this->structureManager = new StructureManager($this->factory->reveal(), $this->extensionManager->reveal(), $this->inspector->reveal(), $this->propertyFactory->reveal(), $typemap); }
public function setUp() { parent::setUp(); $this->contentTypeManager = $this->prophesize(ContentTypeManagerInterface::class); $this->structureProperty = $this->prophesize(PropertyMetadata::class); $this->contentType = $this->prophesize(ContentTypeInterface::class); $this->propertyValue = $this->prophesize(PropertyValue::class); $this->legacyProperty = $this->prophesize(TranslatedProperty::class); $this->structureMetadata = $this->prophesize(StructureMetadata::class); $this->structure = $this->prophesize(Structure::class); $this->propertyFactory = $this->prophesize(LegacyPropertyFactory::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->subscriber = new StructureSubscriber($this->encoder->reveal(), $this->contentTypeManager->reveal(), $this->inspector->reveal(), $this->propertyFactory->reveal()); }
public function setUp() { $this->contentTypeManager = $this->prophesize(ContentTypeManagerInterface::class); $this->node = $this->prophesize(NodeInterface::class); $this->structureMetadata = $this->prophesize(StructureMetadata::class); $this->document = $this->prophesize(StructureBehavior::class); $this->contentType = $this->prophesize(ContentTypeInterface::class); $this->encoder = $this->prophesize(PropertyEncoder::class); $this->propertyMetadata = $this->prophesize(PropertyMetadata::class); $this->propertyFactory = $this->prophesize(LegacyPropertyFactory::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->legacyProperty = $this->prophesize(PropertyInterface::class); $this->structure = new ManagedStructure($this->contentTypeManager->reveal(), $this->propertyFactory->reveal(), $this->inspector->reveal(), $this->document->reveal()); $this->inspector->getNode($this->document->reveal())->willReturn($this->node->reveal()); $this->inspector->getStructureMetadata($this->document->reveal())->willReturn($this->structureMetadata->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'); }
public function setUp() { $this->hydrateEvent = $this->prophesize(HydrateEvent::class); $this->persistEvent = $this->prophesize(PersistEvent::class); $this->encoder = $this->prophesize(PropertyEncoder::class); $this->inspector = $this->prophesize(DocumentInspector::class); $this->namespaceRegistry = $this->prophesize(NamespaceRegistry::class); $this->extensionManager = $this->prophesize(ExtensionManagerInterface::class); $this->extension = $this->prophesize(ExtensionInterface::class); $this->node = $this->prophesize(NodeInterface::class); $this->documentAccessor = $this->prophesize(DocumentAccessor::class); $this->subscriber = new ExtensionSubscriber($this->encoder->reveal(), $this->extensionManager->reveal(), $this->inspector->reveal(), $this->namespaceRegistry->reveal()); $this->hydrateEvent->getNode()->willReturn($this->node->reveal()); $this->hydrateEvent->getLocale()->willReturn('de'); $this->hydrateEvent->getAccessor()->willReturn($this->documentAccessor->reveal()); $this->persistEvent->getNode()->willReturn($this->node->reveal()); $this->persistEvent->getLocale()->willReturn('de'); }
public function setUp() { parent::setUp(); $this->inspector = $this->prophesize(DocumentInspector::class); $this->subscriber = new WebspaceSubscriber($this->encoder->reveal(), $this->inspector->reveal()); }