Skip to content

Commit

Permalink
MAGETWO-52717: [GitHub] Configurable product disabling lowest price a…
Browse files Browse the repository at this point in the history
…ssociated product still shows its price #4419

-- revert store resolving fix
-- fix static tests
  • Loading branch information
vnayda committed Oct 12, 2016
1 parent b9bbe39 commit 7f30596
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Magento\Framework\DB\Select;
use Magento\Store\Model\Store;

/**
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class LinkedProductSelectBuilderBySpecialPrice implements LinkedProductSelectBuilderInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
*/
namespace Magento\CatalogInventory\Model\ResourceModel\Product;

use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Model\ResourceModel\Product\BaseSelectProcessorInterface;
use Magento\CatalogInventory\Model\Stock;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\DB\Select;
use Magento\Framework\EntityManager\MetadataPool;

/**
* Class StockStatusBaseSelectProcessor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
*/
namespace Magento\CatalogInventory\Test\Unit\Model\ResourceModel\Product;

use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Model\ResourceModel\Product\BaseSelectProcessorInterface;
use Magento\CatalogInventory\Model\ResourceModel\Product\StockStatusBaseSelectProcessor;
use Magento\CatalogInventory\Model\Stock;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\DB\Select;
use Magento\Framework\EntityManager\EntityMetadataInterface;
use Magento\Framework\EntityManager\MetadataPool;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;

class StockStatusBaseSelectProcessorTest extends \PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Store/Model/StoreManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function isSingleStoreMode()
public function getStore($storeId = null)
{
if (!isset($storeId) || '' === $storeId || $storeId === true) {
if (null === $this->currentStoreId) {
if (!$this->currentStoreId) {
\Magento\Framework\Profiler::start('store.resolve');
$this->currentStoreId = $this->storeResolver->getCurrentStoreId();
\Magento\Framework\Profiler::stop('store.resolve');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testGetProductsIfOneOfChildIsDisabled()
$lowestPriceChildProduct->setStatus(Status::STATUS_DISABLED);
// update in global scope
$currentStoreId = $this->storeManager->getStore()->getId();
$this->storeManager->setCurrentStore(Store::DEFAULT_STORE_ID);
$this->storeManager->setCurrentStore(Store::ADMIN_CODE);
$this->productRepository->save($lowestPriceChildProduct);
$this->storeManager->setCurrentStore($currentStoreId);

Expand Down

0 comments on commit 7f30596

Please sign in to comment.