88namespace Magento \Framework \View \Test \Unit \Page ;
99
1010use Magento \Framework \View \Layout \Reader \Context ;
11+ use Magento \Framework \View \Model \PageLayout \Config \BuilderInterface ;
1112use Magento \Framework \View \Page \Builder ;
1213use Magento \Framework \View \Page \Config ;
1314use Magento \Framework \View \Page \Layout \Reader ;
15+ use Magento \Framework \View \PageLayout \Config as PageLayoutConfig ;
1416use PHPUnit \Framework \MockObject \MockObject ;
1517
1618/**
@@ -22,7 +24,7 @@ class BuilderTest extends \Magento\Framework\View\Test\Unit\Layout\BuilderTest
2224
2325 /**
2426 * @param array $arguments
25- * @return \Magento\Framework\View\Page \Builder
27+ * @return \Magento\Framework\View\Layout \Builder
2628 */
2729 protected function getBuilder ($ arguments )
2830 {
@@ -39,6 +41,15 @@ protected function getBuilder($arguments)
3941
4042 $ arguments ['pageLayoutReader ' ] = $ this ->createMock (Reader::class);
4143 $ arguments ['pageLayoutReader ' ]->expects ($ this ->once ())->method ('read ' )->with ($ readerContext , 'test_layout ' );
44+ $ pageLayoutConfig = $ this ->createMock (PageLayoutConfig::class);
45+ $ arguments ['pageLayoutBuilder ' ] = $ this ->getMockForAbstractClass (BuilderInterface::class);
46+ $ arguments ['pageLayoutBuilder ' ]->expects ($ this ->once ())
47+ ->method ('getPageLayoutsConfig ' )
48+ ->willReturn ($ pageLayoutConfig );
49+ $ pageLayoutConfig ->expects ($ this ->once ())
50+ ->method ('hasPageLayout ' )
51+ ->with ('test_layout ' )
52+ ->willReturn (true );
4253
4354 return parent ::getBuilder ($ arguments );
4455 }
0 commit comments