Skip to content

Commit 846129a

Browse files
committed
ACPT-1572: Slow saving of stores/websites
- Fix static tests;
1 parent 91438ca commit 846129a

File tree

3 files changed

+74
-28
lines changed

3 files changed

+74
-28
lines changed

app/code/Magento/Store/Test/Unit/Model/GroupTest.php

Lines changed: 68 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,78 @@
2020
use Magento\Store\Model\ResourceModel\Store\CollectionFactory;
2121
use Magento\Store\Model\StoreManagerInterface;
2222
use Magento\Store\Model\Validation\StoreValidator;
23+
use PHPUnit\Framework\MockObject\MockObject;
2324
use PHPUnit\Framework\TestCase;
2425

26+
/**
27+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
28+
*/
2529
class GroupTest extends TestCase
2630
{
27-
private Group $model;
28-
29-
private Context $context;
30-
31-
private Registry $registry;
32-
33-
private ExtensionAttributesFactory $extensionFactory;
34-
35-
private AttributeValueFactory $customAttributeFactory;
36-
37-
private Data $configDataResource;
38-
39-
private CollectionFactory $storeListFactory;
40-
41-
private StoreManagerInterface $storeManager;
42-
43-
private AbstractResource $resource;
44-
45-
private AbstractDb $resourceCollection;
46-
47-
private ManagerInterface $eventManager;
48-
49-
private PoisonPillPutInterface $pillPut;
50-
51-
private StoreValidator $modelValidator;
31+
/**
32+
* @var Group|MockObject
33+
*/
34+
private $model;
35+
36+
/**
37+
* @var Context|MockObject
38+
*/
39+
private $context;
40+
41+
/**
42+
* @var Registry|MockObject
43+
*/
44+
private $registry;
45+
46+
/**
47+
* @var ExtensionAttributesFactory|MockObject
48+
*/
49+
private $extensionFactory;
50+
51+
/**
52+
* @var AttributeValueFactory|MockObject
53+
*/
54+
private $customAttributeFactory;
55+
56+
/**
57+
* @var Data|MockObject
58+
*/
59+
private $configDataResource;
60+
61+
/**
62+
* @var CollectionFactory|MockObject
63+
*/
64+
private $storeListFactory;
65+
66+
/**
67+
* @var StoreManagerInterface|MockObject
68+
*/
69+
private $storeManager;
70+
71+
/**
72+
* @var AbstractResource|MockObject
73+
*/
74+
private $resource;
75+
76+
/**
77+
* @var AbstractDb|MockObject
78+
*/
79+
private $resourceCollection;
80+
81+
/**
82+
* @var ManagerInterface|MockObject
83+
*/
84+
private $eventManager;
85+
86+
/**
87+
* @var PoisonPillPutInterface|MockObject
88+
*/
89+
private $pillPut;
90+
91+
/**
92+
* @var StoreValidator|MockObject
93+
*/
94+
private $modelValidator;
5295

5396
protected function setUp(): void
5497
{

app/code/Magento/Store/Test/Unit/Model/StoreManagerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
use PHPUnit\Framework\MockObject\MockObject;
2525
use PHPUnit\Framework\TestCase;
2626

27+
/**
28+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
29+
*/
2730
class StoreManagerTest extends TestCase
2831
{
2932
/**

dev/tests/integration/testsuite/Magento/Store/Model/WebsiteTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public function testLoadByCode()
5959
}
6060

6161
/**
62-
* @covers Website::setGroups
63-
* @covers Website::setStores
64-
* @covers Website::getStores
62+
* @covers \Magento\Store\Model\Website::setGroups
63+
* @covers \Magento\Store\Model\Website::setStores
64+
* @covers \Magento\Store\Model\Website::getStores
6565
*/
6666
public function testSetGroupsAndStores()
6767
{

0 commit comments

Comments
 (0)