34 private $htmlContentFactory;
38 $this->layout = $this->getMockBuilder(Layout::class)
39 ->disableOriginalConstructor()
41 $this->block = $this->getMockBuilder(AbstractBlock::class)
42 ->disableOriginalConstructor()
43 ->getMockForAbstractClass();
44 $this->context = $this->getMockBuilder(ContextInterface::class)
45 ->disableOriginalConstructor()
46 ->getMockForAbstractClass();
53 $blockName =
'blockName';
54 $bundleComponents[ManagerInterface::COMPONENT_ARGUMENTS_KEY][
'block'][
'name'] = $blockName;
55 $this->layout->expects($this->once())
58 ->willReturn($this->block);
59 $this->context->expects($this->once())
60 ->method(
'getPageLayout')
61 ->willReturn($this->layout);
63 $this->htmlContentFactory->create(
66 'context' => $this->context
70 $this->assertEquals($this->block, $bundleComponents[ManagerInterface::COMPONENT_ARGUMENTS_KEY][
'block']);