Skip to content

Commit 3edb2f2

Browse files
committed
MAGETWO-47656: [GITHUB] Categories Path for Product URLs not working with anchor #2619
1 parent 8eb2ed2 commit 3edb2f2

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

app/code/Magento/CatalogUrlRewrite/Model/Product/AnchorUrlRewriteGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright © 2015 Magento. All rights reserved.
3+
* Copyright © 2016 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento\CatalogUrlRewrite\Model\Product;

app/code/Magento/CatalogUrlRewrite/Model/ProductUrlRewriteGenerator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
use Magento\CatalogUrlRewrite\Service\V1\StoreViewService;
1414
use Magento\Store\Model\Store;
1515

16+
/**
17+
* Class ProductUrlRewriteGenerator
18+
* @package Magento\CatalogUrlRewrite\Model
19+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
20+
*/
1621
class ProductUrlRewriteGenerator
1722
{
1823
/**

app/code/Magento/CatalogUrlRewrite/Test/Unit/Model/ProductUrlRewriteGeneratorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ protected function setUp()
8585
'storeManager' => $this->storeManager,
8686
]
8787
);
88+
89+
$reflection = new \ReflectionClass(get_class($this->productUrlRewriteGenerator));
90+
$reflectionProperty = $reflection->getProperty('anchorUrlRewriteGenerator');
91+
$reflectionProperty->setAccessible(true);
92+
$reflectionProperty->setValue($this->productUrlRewriteGenerator, $this->anchorUrlRewriteGenerator);
8893
}
8994

9095
/**

0 commit comments

Comments
 (0)