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 2424 */
2525class UrlTest extends TestCase
2626{
27+ /**
28+ * @var CategoryRepositoryInterface
29+ */
2730 private CategoryRepositoryInterface $ categoryRepository ;
31+
32+ /**
33+ * @var DataFixtureStorage
34+ */
2835 private DataFixtureStorage $ fixtures ;
36+
37+ /**
38+ * @var StoreManagerInterface
39+ */
2940 private StoreManagerInterface $ storeManager ;
41+
42+ /**
43+ * @var Url
44+ */
3045 private Url $ urlResource ;
3146
3247 protected function setUp (): void
@@ -69,10 +84,10 @@ public function testIsActiveScope(): void
6984 $ storeId = (int ) $ this ->storeManager ->getStore ('default ' )->getId ();
7085
7186 // 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+ }
7691
7792 // Disable c3 for store
7893 $ c3 = $ this ->categoryRepository ->get ($ categoryIds ['c3 ' ], $ storeId );
You can’t perform that action at this time.
0 commit comments