Skip to content

Commit 7f30596

Browse files
author
vnayda
committed
MAGETWO-52717: [GitHub] Configurable product disabling lowest price associated product still shows its price #4419
-- revert store resolving fix -- fix static tests
1 parent b9bbe39 commit 7f30596

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/LinkedProductSelectBuilderBySpecialPrice.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
use Magento\Framework\DB\Select;
1212
use Magento\Store\Model\Store;
1313

14+
/**
15+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
16+
*/
1417
class LinkedProductSelectBuilderBySpecialPrice implements LinkedProductSelectBuilderInterface
1518
{
1619
/**

app/code/Magento/CatalogInventory/Model/ResourceModel/Product/StockStatusBaseSelectProcessor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
*/
77
namespace Magento\CatalogInventory\Model\ResourceModel\Product;
88

9-
use Magento\Catalog\Api\Data\ProductInterface;
109
use Magento\Catalog\Model\ResourceModel\Product\BaseSelectProcessorInterface;
1110
use Magento\CatalogInventory\Model\Stock;
1211
use Magento\Framework\App\ResourceConnection;
1312
use Magento\Framework\DB\Select;
14-
use Magento\Framework\EntityManager\MetadataPool;
1513

1614
/**
1715
* Class StockStatusBaseSelectProcessor

app/code/Magento/CatalogInventory/Test/Unit/Model/ResourceModel/Product/StockStatusBaseSelectProcessorTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
*/
66
namespace Magento\CatalogInventory\Test\Unit\Model\ResourceModel\Product;
77

8-
use Magento\Catalog\Api\Data\ProductInterface;
98
use Magento\Catalog\Model\ResourceModel\Product\BaseSelectProcessorInterface;
109
use Magento\CatalogInventory\Model\ResourceModel\Product\StockStatusBaseSelectProcessor;
1110
use Magento\CatalogInventory\Model\Stock;
1211
use Magento\Framework\App\ResourceConnection;
1312
use Magento\Framework\DB\Select;
14-
use Magento\Framework\EntityManager\EntityMetadataInterface;
15-
use Magento\Framework\EntityManager\MetadataPool;
1613
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1714

1815
class StockStatusBaseSelectProcessorTest extends \PHPUnit_Framework_TestCase

app/code/Magento/Store/Model/StoreManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public function isSingleStoreMode()
150150
public function getStore($storeId = null)
151151
{
152152
if (!isset($storeId) || '' === $storeId || $storeId === true) {
153-
if (null === $this->currentStoreId) {
153+
if (!$this->currentStoreId) {
154154
\Magento\Framework\Profiler::start('store.resolve');
155155
$this->currentStoreId = $this->storeResolver->getCurrentStoreId();
156156
\Magento\Framework\Profiler::stop('store.resolve');

dev/tests/integration/testsuite/Magento/ConfigurableProduct/Pricing/Price/LowestPriceOptionProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testGetProductsIfOneOfChildIsDisabled()
5858
$lowestPriceChildProduct->setStatus(Status::STATUS_DISABLED);
5959
// update in global scope
6060
$currentStoreId = $this->storeManager->getStore()->getId();
61-
$this->storeManager->setCurrentStore(Store::DEFAULT_STORE_ID);
61+
$this->storeManager->setCurrentStore(Store::ADMIN_CODE);
6262
$this->productRepository->save($lowestPriceChildProduct);
6363
$this->storeManager->setCurrentStore($currentStoreId);
6464

0 commit comments

Comments
 (0)