-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Forward Port PR-14344] Fix generating product URL rewrites for anchor categories #26784
Merged
magento-engcom-team
merged 8 commits into
magento:2.4-develop
from
hostep:forward-port-pr-14344
Mar 17, 2020
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
cb685d1
Fix generating product URL rewrites for anchor categories
acb8642
Updated unit test and make sure it passes the store id to the get cal…
hostep 97258e1
Changes are covered by the integration test
engcom-Echo 6cf26dc
Merge branch '2.4-develop' of http://github.com/magento/magento2 into…
engcom-Echo 0b94121
Minor change
engcom-Echo b0c0c59
Cover MFTF test
engcom-Echo 28fa345
Minor change
engcom-Echo bf514b0
Refactoring test and add rollback for fixture
engcom-Echo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ntegration/testsuite/Magento/CatalogUrlRewrite/_files/categories_with_stores_rollback.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
/** @var \Magento\Framework\Registry $registry */ | ||
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); | ||
$registry = $objectManager->get(\Magento\Framework\Registry::class); | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', true); | ||
|
||
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */ | ||
$collection = $objectManager->create(\Magento\Catalog\Model\ResourceModel\Category\Collection::class); | ||
$collection | ||
->addAttributeToFilter('level', 2) | ||
->load() | ||
->delete(); | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...s/integration/testsuite/Magento/CatalogUrlRewrite/_files/product_with_stores_rollback.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
use Magento\Framework\Exception\NoSuchEntityException; | ||
|
||
\Magento\TestFramework\Helper\Bootstrap::getInstance()->getInstance()->reinitialize(); | ||
|
||
/** @var \Magento\Framework\Registry $registry */ | ||
$registry = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(\Magento\Framework\Registry::class); | ||
|
||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', true); | ||
|
||
/** @var \Magento\Catalog\Api\ProductRepositoryInterface $productRepository */ | ||
$productRepository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() | ||
->get(\Magento\Catalog\Api\ProductRepositoryInterface::class); | ||
try { | ||
$product = $productRepository->get('simple', true); | ||
if ($product->getId()) { | ||
$productRepository->delete($product); | ||
} | ||
} catch (NoSuchEntityException $e) { | ||
} | ||
$registry->unregister('isSecureArea'); | ||
$registry->register('isSecureArea', false); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what input should the result change?
I see expectation attribute, but there's not context attribute.