File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
lib/internal/Magento/Framework/View/Test/Unit Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1111use Magento \Framework \App \AreaList ;
1212use Magento \Framework \App \Request \Http ;
1313use Magento \Framework \App \State ;
14+ use Magento \Framework \View \DesignLoader ;
1415use PHPUnit \Framework \MockObject \MockObject ;
1516use PHPUnit \Framework \TestCase ;
1617
1718class DesignLoaderTest extends TestCase
1819{
20+ /**
21+ * @var DesignLoader
22+ */
23+ protected $ _model ;
24+
1925 /**
2026 * @var MockObject
2127 */
@@ -39,6 +45,11 @@ protected function setUp(): void
3945 $ this ->_areaListMock = $ this ->createMock (AreaList::class);
4046 $ this ->_requestMock = $ this ->createMock (Http::class);
4147 $ this ->appState = $ this ->createMock (State::class);
48+ $ this ->_model = new DesignLoader (
49+ $ this ->_requestMock ,
50+ $ this ->_areaListMock ,
51+ $ this ->appState
52+ );
4253 }
4354
4455 /**
@@ -51,7 +62,8 @@ public function testLoad(): void
5162 $ this ->_areaListMock ->expects ($ this ->once ())->method ('getArea ' )->with ('area ' )->willReturn ($ area );
5263 $ area
5364 ->method ('load ' )
54- ->withConsecutive ([Area::PART_DESIGN ])
55- ->willReturnOnConsecutiveCalls ($ area );
65+ ->withConsecutive ([Area::PART_DESIGN ], [Area::PART_TRANSLATE ])
66+ ->willReturnOnConsecutiveCalls ($ area , $ area );
67+ $ this ->_model ->load ($ this ->_requestMock );
5668 }
5769}
You can’t perform that action at this time.
0 commit comments