本文整理匯總了PHP中Magento\Framework\Locale\FormatInterface::expects方法的典型用法代碼示例。如果您正苦於以下問題:PHP FormatInterface::expects方法的具體用法?PHP FormatInterface::expects怎麽用?PHP FormatInterface::expects使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Framework\Locale\FormatInterface
的用法示例。
在下文中一共展示了FormatInterface::expects方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUp
protected function setUp()
{
$this->objectManagerHelper = new ObjectManagerHelper($this);
$this->mathDivision = $this->getMock('\\Magento\\Framework\\Math\\Division', ['getExactDivision'], [], '', false);
$this->localeFormat = $this->getMockForAbstractClass('\\Magento\\Framework\\Locale\\FormatInterface', ['getNumber']);
$this->localeFormat->expects($this->any())->method('getNumber')->willReturn($this->qty);
$this->object = $this->objectManagerHelper->getObject('Magento\\Framework\\DataObject');
$this->objectFactory = $this->getMock('\\Magento\\Framework\\DataObject\\Factory', ['create'], [], '', false);
$this->objectFactory->expects($this->any())->method('create')->willReturn($this->object);
$this->product = $this->getMock('Magento\\Catalog\\Model\\Product', ['load', 'isComposite', '__wakeup', 'isSaleable'], [], '', false);
$this->productFactory = $this->getMock('Magento\\Catalog\\Model\\ProductFactory', ['create'], [], '', false);
$this->productFactory->expects($this->any())->method('create')->willReturn($this->product);
$this->stockStateProvider = $this->objectManagerHelper->getObject('Magento\\CatalogInventory\\Model\\StockStateProvider', ['mathDivision' => $this->mathDivision, 'localeFormat' => $this->localeFormat, 'objectFactory' => $this->objectFactory, 'productFactory' => $this->productFactory, 'qtyCheckApplicable' => $this->qtyCheckApplicable]);
}