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'); }