File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 24
24
*/
25
25
class UrlTest extends TestCase
26
26
{
27
+ /**
28
+ * @var CategoryRepositoryInterface
29
+ */
27
30
private CategoryRepositoryInterface $ categoryRepository ;
31
+
32
+ /**
33
+ * @var DataFixtureStorage
34
+ */
28
35
private DataFixtureStorage $ fixtures ;
36
+
37
+ /**
38
+ * @var StoreManagerInterface
39
+ */
29
40
private StoreManagerInterface $ storeManager ;
41
+
42
+ /**
43
+ * @var Url
44
+ */
30
45
private Url $ urlResource ;
31
46
32
47
protected function setUp (): void
@@ -69,10 +84,10 @@ public function testIsActiveScope(): void
69
84
$ storeId = (int ) $ this ->storeManager ->getStore ('default ' )->getId ();
70
85
71
86
// Get Category IDs
72
- $ fixtureNames = [' c1 ' , ' c2 ' , ' c3 ' , ' c4 ' ];
73
- $ categoryIds = array_combine ( $ fixtureNames , array_map ( function ( string $ fixtureName ): int {
74
- return (int ) $ this ->fixtures ->get ($ fixtureName )->getId ();
75
- }, $ fixtureNames ));
87
+ $ categoryIds = [];
88
+ foreach ([ ' c1 ' , ' c2 ' , ' c3 ' , ' c4 ' ] as $ fixtureName ) {
89
+ $ categoryIds [ $ fixtureName ] = (int ) $ this ->fixtures ->get ($ fixtureName )->getId ();
90
+ }
76
91
77
92
// Disable c3 for store
78
93
$ c3 = $ this ->categoryRepository ->get ($ categoryIds ['c3 ' ], $ storeId );
You can’t perform that action at this time.
0 commit comments