Skip to content

Commit

Permalink
Merge pull request magento#5742 from magento-mpi/PR2.4-2020-29-04
Browse files Browse the repository at this point in the history
[mpi] MC-29755: X-Magento-Tags header too large
  • Loading branch information
dhorytskyi authored Jun 4, 2020
2 parents dc6d0b0 + 71114d7 commit 3b611a7
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 205 deletions.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions app/code/Magento/ConfigurableProduct/etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<type name="Magento\ConfigurableProduct\Model\ResourceModel\Attribute\OptionSelectBuilderInterface">
<plugin name="Magento_ConfigurableProduct_Plugin_Model_ResourceModel_Attribute_InStockOptionSelectBuilder" type="Magento\ConfigurableProduct\Plugin\Model\ResourceModel\Attribute\InStockOptionSelectBuilder"/>
</type>
<type name="Magento\Catalog\Model\Product">
<plugin name="product_identities_extender" type="Magento\ConfigurableProduct\Model\Plugin\Frontend\ProductIdentitiesExtender" />
</type>
<type name="Magento\ConfigurableProduct\Model\Product\Type\Configurable">
<plugin name="used_products_cache" type="Magento\ConfigurableProduct\Model\Plugin\Frontend\UsedProductsCache" />
</type>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,37 @@
class ProductTest extends \PHPUnit\Framework\TestCase
{
/**
* Check that no children identities are added to the parent product in frontend area
*
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
* @magentoAppArea frontend
* @return void
*/
public function testGetIdentities()
public function testGetIdentitiesForConfigurableProductOnStorefront(): void
{
$productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
$confProduct = $productRepository->get('configurable');
$simple10Product = $productRepository->get('simple_10');
$simple20Product = $productRepository->get('simple_20');
$configurableProduct = $productRepository->get('configurable');
$expectedIdentities = [
'cat_p_' . $configurableProduct->getId(),
'cat_p'
];
$this->assertEquals($expectedIdentities, $configurableProduct->getIdentities());
}

$this->assertEmpty(array_diff($confProduct->getIdentities(), $simple10Product->getIdentities()));
$this->assertEmpty(array_diff($confProduct->getIdentities(), $simple20Product->getIdentities()));
/**
* Check that no children identities are added to the parent product in frontend area
*
* @magentoDataFixture Magento/ConfigurableProduct/_files/product_configurable.php
* @magentoAppArea adminhtml
* @return void
*/
public function testGetIdentitiesForConfigurableProductInAdminArea(): void
{
$productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
$configurableProduct = $productRepository->get('configurable');
$expectedIdentities = [
'cat_p_' . $configurableProduct->getId(),
];
$this->assertEquals($expectedIdentities, $configurableProduct->getIdentities());
}
}

0 comments on commit 3b611a7

Please sign in to comment.