本文整理匯總了PHP中DataHandler::createWarehouseData方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataHandler::createWarehouseData方法的具體用法?PHP DataHandler::createWarehouseData怎麽用?PHP DataHandler::createWarehouseData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataHandler
的用法示例。
在下文中一共展示了DataHandler::createWarehouseData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: test_createWarehouseData
public function test_createWarehouseData()
{
/** === Test Data === */
$PROD_ID = 21;
$STOCK_ID = 32;
$PRICE = 43.32;
$PV = 54.32;
/** === Setup Mocks === */
// $result = $this->_manObj->create(StockItemInterface::class);
$mResult = $this->_mock(\Magento\CatalogInventory\Api\Data\StockItemInterface::class);
$mResult->shouldReceive('setProductId', 'setStockId', 'setIsInStock', 'setManageStock', 'getItemId');
$this->mManObj->shouldReceive('create')->once()->andReturn($mResult);
// $result = $this->_mageRepoStockItem->save($result);
$this->mMageRepoStockItem->shouldReceive('save')->once()->andReturn($mResult);
// $this->_repoWarehouseEntityStockItem->create($bind);
$this->mRepoWarehouseEntityStockItem->shouldReceive('create')->once();
// $this->_repoPvStockItem->create($bind);
$this->mRepoPvStockItem->shouldReceive('create')->once();
/** === Call and asserts === */
$this->obj->createWarehouseData($PROD_ID, $STOCK_ID, $PRICE, $PV);
}