Skip to content

Commit

Permalink
Fixed broken builds for GitHub issue magento#167
Browse files Browse the repository at this point in the history
  • Loading branch information
maghamed committed Nov 22, 2017
1 parent 74465a8 commit 2e6976c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 44 deletions.
25 changes: 0 additions & 25 deletions app/code/Magento/InventoryApi/Test/_files/products_simple.php

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class UpdateLegacyCatalogInventoryPlugin
/**
* @var \Magento\CatalogInventory\Api\StockRegistryInterface
*/
protected $stockRegistry;
private $stockRegistry;

/**
* @param ResourceConnection $resourceConnection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
use Magento\CatalogInventory\Api\Data\StockItemInterface;
use Magento\InventoryApi\Api\GetProductQuantityInStockInterface;
use Magento\Indexer\Model\Indexer;
use Magento\Inventory\Indexer\StockItemIndexerInterface;
use Magento\Inventory\Indexer\SourceItem\SourceItemIndexer;

class UpdateLegacyCatalogInventoryPluginTest extends TestCase
{
Expand Down Expand Up @@ -66,7 +66,7 @@ protected function setUp()
$this->stockItemCriteriaFactory = Bootstrap::getObjectManager()->get(StockItemCriteriaInterfaceFactory::class);

$this->indexer = Bootstrap::getObjectManager()->get(Indexer::class);
$this->indexer->load(StockItemIndexerInterface::INDEXER_ID);
$this->indexer->load(SourceItemIndexer::INDEXER_ID);
$this->getProductQtyInStock = Bootstrap::getObjectManager()->get(GetProductQuantityInStockInterface::class);
$this->productRepository = Bootstrap::getObjectManager()->get(ProductRepositoryInterface::class);
}
Expand Down Expand Up @@ -146,6 +146,7 @@ public function testThatReservationPlacedUpdatesBothOldAndNewStocks()
$oldStockItem = current($collectionAfterChange->getItems());
$quantityAfterCheck = $oldStockItem->getQty();

$this->assertEquals(8.5 - 5, $this->getProductQtyInStock->execute('SKU-1', 10));
$this->assertEquals($this->getProductQtyInStock->execute('SKU-1', 10), $quantityAfterCheck);
}
}

0 comments on commit 2e6976c

Please sign in to comment.