コード例 #1
0
 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);
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 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());
 }