File tree 2 files changed +14
-6
lines changed
dev/tests/integration/framework/Magento/TestFramework
2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ class AppArea
15
15
private $ _application ;
16
16
17
17
/**
18
- * List of allowed areas
18
+ * List of allowed areas.
19
19
*
20
20
* @var array
21
21
*/
22
22
private $ _allowedAreas = [
23
23
\Magento \Framework \App \Area::AREA_GLOBAL ,
24
- \Magento \Backend \App \Area \FrontNameResolver:: AREA_CODE ,
24
+ \Magento \Framework \App \Area:: AREA_ADMINHTML ,
25
25
\Magento \Framework \App \Area::AREA_FRONTEND ,
26
- ' webapi_rest ' ,
27
- ' webapi_soap ' ,
28
- ' cron ' ,
26
+ \ Magento \ Framework \ App \Area:: AREA_WEBAPI_REST ,
27
+ \ Magento \ Framework \ App \Area:: AREA_WEBAPI_SOAP ,
28
+ \ Magento \ Framework \ App \Area:: AREA_CRONTAB ,
29
29
];
30
30
31
31
/**
Original file line number Diff line number Diff line change @@ -600,6 +600,7 @@ public function getArea()
600
600
*
601
601
* @param string $areaCode
602
602
* @return void
603
+ * @throws \Magento\Framework\Exception\LocalizedException
603
604
*/
604
605
public function loadArea ($ areaCode )
605
606
{
@@ -616,7 +617,14 @@ public function loadArea($areaCode)
616
617
)
617
618
);
618
619
$ app = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->get (\Magento \Framework \App \AreaList::class);
619
- if ($ areaCode == \Magento \TestFramework \Application::DEFAULT_APP_AREA ) {
620
+ $ areasForPartialLoading = [
621
+ \Magento \Framework \App \Area::AREA_GLOBAL ,
622
+ \Magento \Framework \App \Area::AREA_WEBAPI_REST ,
623
+ \Magento \Framework \App \Area::AREA_WEBAPI_SOAP ,
624
+ \Magento \Framework \App \Area::AREA_CRONTAB ,
625
+
626
+ ];
627
+ if (in_array ($ areaCode , $ areasForPartialLoading , true )) {
620
628
$ app ->getArea ($ areaCode )->load (\Magento \Framework \App \Area::PART_CONFIG );
621
629
} else {
622
630
\Magento \TestFramework \Helper \Bootstrap::getInstance ()->loadArea ($ areaCode );
You can’t perform that action at this time.
0 commit comments