Skip to content
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

MSI: #302 (Refactoring CatalogSearch Module) #304

Closed
wants to merge 19 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
FIX: 302
-  Fix static tests
-  Fix intigrations tests
larsroettig committed Jan 2, 2018
commit 82ce1aed8555f600a702b3a7cf2ef31afce1b1f0
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@

/**
* Allow to use different stock query (Service Provider Interface - SPI)
* @api
*/
interface StockSelectProviderInterface
{
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@

/**
* Adds filter by stock status to base select (SPI)
* @api
*/
interface StockStatusFilterInterface
{
Original file line number Diff line number Diff line change
@@ -108,7 +108,7 @@ private function getSubSelect(int $currentScope, AbstractAttribute $attribute, S
/**
* @return bool
*/
private function isShowOutOfStock()
private function isShowOutOfStock(): bool
{
return $this->scopeConfig->isSetFlag(
'cataloginventory/options/show_out_of_stock',
1 change: 1 addition & 0 deletions app/code/Magento/InventoryCatalogSearch/composer.json
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/framework": "100.3.*",
"magento/module-catalog": "100.3.*",
"magento/module-eav": "100.3.*",
"magento/module-store": "100.3.*",
"magento/module-catalog-inventory": "100.3.*",
"magento/module-catalog-search": "100.0.*",
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@
"magento/module-inventory-import-export": "100.0.0-dev",
"magento/module-inventory-sales": "100.0.0-dev",
"magento/module-inventory-sales-api": "100.0.0-dev",
"magento/module-inventory-catalog-search": "100.0.0-dev",
"magento/module-layered-navigation": "100.3.0-dev",
"magento/module-media-storage": "100.3.0-dev",
"magento/module-msrp": "100.3.0-dev",
Original file line number Diff line number Diff line change
@@ -6,18 +6,27 @@

namespace Magento\Bundle\Model\ResourceModel\Indexer;

use \Magento\TestFramework\Helper\Bootstrap;

class StockTest extends \PHPUnit\Framework\TestCase
{
/**
* @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor
*/
protected $processor;

/**
* @var \Magento\Inventory\Indexer\Stock\StockIndexer
*/
private $stockIndexer;

protected function setUp()
{
$this->processor = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
$this->processor = Bootstrap::getObjectManager()->get(
\Magento\CatalogInventory\Model\Indexer\Stock\Processor::class
);

$this->stockIndexer = Bootstrap::getObjectManager()->get(\Magento\Inventory\Indexer\Stock\StockIndexer::class);
}

/**
@@ -28,6 +37,7 @@ protected function setUp()
public function testReindexAll()
{
$this->processor->reindexAll();
$this->stockIndexer->executeFull();

$categoryFactory = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
\Magento\Catalog\Model\CategoryFactory::class