Skip to content

Commit

Permalink
Bugfix: Use the first area as base area (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibor Kotosz authored Jun 20, 2020
1 parent 9d5fdc8 commit d23a26d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public function initApplication(BeforeSuiteTested $event)

$configLoader = $magentoObjectManager->get(ConfigLoaderInterface::class);

$config = $configLoader->load(Area::AREA_GLOBAL);
$mainArea = array_shift($areas);
$config = $configLoader->load($mainArea);
foreach ($areas as $area) {
$config = array_replace_recursive(
$config,
Expand All @@ -86,9 +87,8 @@ public function initApplication(BeforeSuiteTested $event)

$magentoObjectManager->configure($config);

$baseArea = array_shift($areas);
$appState = $magentoObjectManager->get(State::class);
$appState->setAreaCode($baseArea);
$appState->setAreaCode($mainArea);

// TODO can we remove this?
if ($appState->getAreaCode() === Area::AREA_ADMINHTML) {
Expand Down

0 comments on commit d23a26d

Please sign in to comment.