Skip to content

Commit 4b0538f

Browse files
MC-22738: Layered Navigation with different product attributes on Category page
1 parent 8fa5564 commit 4b0538f

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

dev/tests/integration/testsuite/Magento/Catalog/_files/category_with_different_price_products.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Magento\TestFramework\Helper\Bootstrap;
1616

1717
$objectManager = Bootstrap::getObjectManager();
18-
$categoryFactory = Bootstrap::getObjectManager()->get(CategoryInterfaceFactory::class);
18+
$categoryFactory = $objectManager->get(CategoryInterfaceFactory::class);
1919
$productFactory = $objectManager->get(ProductInterfaceFactory::class);
2020
$productRepository = $objectManager->get(ProductRepositoryInterface::class);
2121

dev/tests/integration/testsuite/Magento/Catalog/_files/category_with_different_price_products_rollback.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
try {
2424
$productRepository->deleteById('simple1000');
2525
} catch (NoSuchEntityException $e) {
26+
//Already deleted.
2627
}
2728

2829
try {
2930
$productRepository->deleteById('simple1001');
3031
} catch (NoSuchEntityException $e) {
32+
//Already deleted.
3133
}
3234

3335
try {
@@ -38,6 +40,7 @@
3840
->getFirstItem();
3941
$categoryRepository->delete($category);
4042
} catch (NoSuchEntityException $e) {
43+
//Already deleted.
4144
}
4245
$registry->unregister('isSecureArea');
4346
$registry->register('isSecureArea', false);

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/AbstractCategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function setUp()
5656
$this->objectManager = Bootstrap::getObjectManager();
5757
$this->categoryCollectionFactory = $this->objectManager->create(CollectionFactory::class);
5858
$this->categoryResource = $this->objectManager->get(CategoryResource::class);
59-
$this->layout = $this->objectManager->create(LayoutInterface::class);
59+
$this->layout = $this->objectManager->get(LayoutInterface::class);
6060
$this->navigationBlock = $this->objectManager->create(Category::class);
6161
parent::setUp();
6262
}

dev/tests/integration/testsuite/Magento/LayeredNavigation/Block/Navigation/Category/SelectFilterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getFiltersWithCustomAttributeDataProvider(): array
5050
'not_used_in_navigation' => [
5151
'products_data' => [],
5252
'filterable' => 0,
53-
'expectation' => []
53+
'expectation' => [],
5454
],
5555
'used_in_navigation_with_results' => [
5656
'products_data' => [
@@ -61,7 +61,7 @@ public function getFiltersWithCustomAttributeDataProvider(): array
6161
'expectation' => [
6262
['label' => 'Option 1', 'count' => 1],
6363
['label' => 'Option 2', 'count' => 1],
64-
]
64+
],
6565
],
6666
'used_in_navigation_without_results' => [
6767
'products_data' => [
@@ -73,7 +73,7 @@ public function getFiltersWithCustomAttributeDataProvider(): array
7373
['label' => 'Option 1', 'count' => 1],
7474
['label' => 'Option 2', 'count' => 1],
7575
['label' => 'Option 3', 'count' => 0],
76-
]
76+
],
7777
],
7878
];
7979
}

dev/tests/integration/testsuite/Magento/Swatches/_files/product_visual_swatch_attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
],
6161
]
6262
);
63-
$attribute->save();
63+
$attributeRepository->save($attribute);
6464
$installer->addAttributeToGroup(
6565
ProductAttributeInterface::ENTITY_TYPE_CODE,
6666
'Default',

0 commit comments

Comments
 (0)