8
8
namespace Magento \Framework \View \Test \Unit \Page ;
9
9
10
10
use Magento \Framework \View \Layout \Reader \Context ;
11
+ use Magento \Framework \View \Model \PageLayout \Config \BuilderInterface ;
11
12
use Magento \Framework \View \Page \Builder ;
12
13
use Magento \Framework \View \Page \Config ;
13
14
use Magento \Framework \View \Page \Layout \Reader ;
15
+ use Magento \Framework \View \PageLayout \Config as PageLayoutConfig ;
14
16
use PHPUnit \Framework \MockObject \MockObject ;
15
17
16
18
/**
@@ -22,7 +24,7 @@ class BuilderTest extends \Magento\Framework\View\Test\Unit\Layout\BuilderTest
22
24
23
25
/**
24
26
* @param array $arguments
25
- * @return \Magento\Framework\View\Page \Builder
27
+ * @return \Magento\Framework\View\Layout \Builder
26
28
*/
27
29
protected function getBuilder ($ arguments )
28
30
{
@@ -39,6 +41,15 @@ protected function getBuilder($arguments)
39
41
40
42
$ arguments ['pageLayoutReader ' ] = $ this ->createMock (Reader::class);
41
43
$ 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 );
42
53
43
54
return parent ::getBuilder ($ arguments );
44
55
}
0 commit comments