Skip to content

Commit 0d78e56

Browse files
committed
MAGETWO-89238: [Sales email] Disabled invoice emails produce performance issue
1 parent ccb9b2f commit 0d78e56

File tree

3 files changed

+4
-15
lines changed

3 files changed

+4
-15
lines changed

app/code/Magento/Store/Model/Config/Importer/Processor/Create.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ class Create implements ProcessorInterface
5252
/**
5353
* The event manager.
5454
*
55+
* @deprecated logic moved inside of "afterSave" method
56+
* \Magento\Store\Model\Website::afterSave
57+
* \Magento\Store\Model\Group::afterSave
58+
* \Magento\Store\Model\Store::afterSave
5559
* @var ManagerInterface
5660
*/
5761
private $eventManager;
@@ -181,8 +185,6 @@ private function createGroups(array $items, array $data)
181185
$group->setDefaultStoreId($store->getStoreId());
182186
$group->setWebsite($website);
183187
$group->getResource()->save($group);
184-
185-
//$this->eventManager->dispatch('store_group_save', ['group' => $group]);
186188
});
187189
}
188190
}

app/code/Magento/Store/Test/Unit/Model/Config/Importer/Processor/CreateTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,6 @@ public function testRunGroup()
325325
return $function();
326326
});
327327

328-
$this->eventManagerMock->expects($this->once())
329-
->method('dispatch')
330-
->with('store_group_save', ['group' => $this->groupMock]);
331-
332328
$this->processor->run($this->data);
333329
}
334330

@@ -382,10 +378,6 @@ public function testRunStore()
382378
return $function();
383379
});
384380

385-
$this->eventManagerMock->expects($this->once())
386-
->method('dispatch')
387-
->with('store_add', ['store' => $this->storeMock]);
388-
389381
$this->processor->run($this->data);
390382
}
391383

setup/src/Magento/Setup/Test/Unit/Fixtures/StoresFixtureTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function testExecute()
7575
'getDefaultStoreView',
7676
'getStore',
7777
'getStores',
78-
'reinitStores'
7978
]
8079
)->getMock();
8180

@@ -250,10 +249,6 @@ public function testExecute()
250249
)
251250
->willReturn($storeGroupMock);
252251

253-
$this->storeManagerMock->expects($this->once())
254-
->method('reinitStores')
255-
->willReturn('void');
256-
257252
$this->storeManagerMock->expects($this->once())
258253
->method('getGroups')
259254
->willReturn([$storeGroupMock]);

0 commit comments

Comments
 (0)