public function setUp() { parent::setUp(); $this->subscriber = new OrderSubscriber($this->encoder->reveal()); $this->hydrateEvent->getDocument()->willReturn(new TestOrderDocument(10)); $this->hydrateEvent->getNode()->willReturn($this->node->reveal()); }
public function setUp() { parent::setUp(); $this->inspector = $this->prophesize(DocumentInspector::class); $this->subscriber = new OrderSubscriber($this->inspector->reveal()); $this->persistEvent->getDocument()->willReturn(new TestOrderDocument(null)); $this->persistEvent->getNode()->willReturn($this->node->reveal()); }
public function setUp() { parent::setUp(); $this->persistEvent = $this->prophesize(PersistEvent::class); $this->persistEvent->getNode()->willReturn($this->node); $this->document = $this->prophesize(TestShadowDocumentInterface::class); $this->subscriber = new ShadowCopyPropertiesSubscriber($this->encoder->reveal()); }
public function setUp() { parent::setUp(); $this->document = $this->prophesize(RedirectTypeBehavior::class); $this->persistEvent->getDocument()->willReturn($this->document->reveal()); $this->metadata = $this->prophesize(Metadata::class); $this->event = $this->prophesize(MetadataLoadEvent::class); $this->subscriber = new RedirectTypeSubscriber($this->encoder->reveal()); $this->event->getMetadata()->willReturn($this->metadata); }
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() { 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() { parent::setUp(); $this->subscriber = new SecuritySubscriber(); }
public function setUp() { parent::setUp(); $this->inspector = $this->prophesize(DocumentInspector::class); $this->subscriber = new WebspaceSubscriber($this->encoder->reveal(), $this->inspector->reveal()); }
public function setUp() { parent::setUp(); $this->searchManager = $this->prophesize(SearchManagerInterface::class); $this->subscriber = new StructureSubscriber($this->searchManager->reveal()); }