本文整理汇总了PHP中Magento\Eav\Model\Config::method方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::method方法的具体用法?PHP Config::method怎么用?PHP Config::method使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Eav\Model\Config
的用法示例。
在下文中一共展示了Config::method方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
parent::setUp();
$this->jsonHelper = $this->getMock('\\Magento\\Framework\\Json\\Helper\\Data', [], [], '', false);
$this->importExportData = $this->getMock('\\Magento\\ImportExport\\Helper\\Data', [], [], '', false);
$this->resourceHelper = $this->getMock('\\Magento\\ImportExport\\Model\\ResourceModel\\Helper', [], [], '', false);
$this->resource = $this->getMock('\\Magento\\Framework\\App\\ResourceConnection', ['getConnection'], [], '', false);
$this->connection = $this->getMockForAbstractClass('\\Magento\\Framework\\DB\\Adapter\\AdapterInterface', [], '', false);
$this->resource->expects($this->any())->method('getConnection')->willReturn($this->connection);
$this->dataSourceModel = $this->getMock('\\Magento\\ImportExport\\Model\\ResourceModel\\Import\\Data', [], [], '', false);
$this->eavConfig = $this->getMock('\\Magento\\Eav\\Model\\Config', [], [], '', false);
$entityType = $this->getMock('\\Magento\\Eav\\Model\\Entity\\Type', [], [], '', false);
$entityType->method('getEntityTypeId')->willReturn('');
$this->eavConfig->method('getEntityType')->willReturn($entityType);
$this->resourceFactory = $this->getMock('\\Magento\\CatalogImportExport\\Model\\Import\\Proxy\\Product\\ResourceModelFactory', ['create', 'getTable'], [], '', false);
$this->resourceFactory->expects($this->any())->method('create')->willReturnSelf();
$this->resourceFactory->expects($this->any())->method('getTable')->willReturnSelf();
$this->catalogData = $this->getMock('\\Magento\\Catalog\\Helper\\Data', [], [], '', false);
$this->storeResolver = $this->getMock('\\Magento\\CatalogImportExport\\Model\\Import\\Product\\StoreResolver', [], [], '', false);
$this->importProduct = $this->getMock('\\Magento\\CatalogImportExport\\Model\\Import\\Product', [], [], '', false);
$this->productModel = $this->getMock('\\Magento\\Catalog\\Model\\Product', [], [], '', false);
$this->validator = $this->getMock('\\Magento\\AdvancedPricingImportExport\\Model\\Import\\AdvancedPricing\\Validator', ['isValid', 'getMessages'], [], '', false);
$this->websiteValidator = $this->getMock('\\Magento\\AdvancedPricingImportExport\\Model\\Import\\AdvancedPricing\\Validator\\Website', [], [], '', false);
$this->tierPriceValidator = $this->getMock('\\Magento\\AdvancedPricingImportExport\\Model\\Import\\AdvancedPricing\\Validator\\TierPrice', [], [], '', false);
$this->stringObject = $this->getMock('\\Magento\\Framework\\Stdlib\\StringUtils', [], [], '', false);
$this->errorAggregator = $this->getErrorAggregatorObject();
$this->dateTime = $this->getMock('\\Magento\\Framework\\Stdlib\\DateTime\\DateTime', ['date', 'format'], [], '', false);
$this->dateTime->expects($this->any())->method('date')->willReturnSelf();
$this->advancedPricing = $this->getAdvancedPricingMock(['retrieveOldSkus', 'validateRow', 'addRowError', 'saveProductPrices', 'getCustomerGroupId', 'getWebSiteId', 'deleteProductTierPrices', 'getBehavior', 'saveAndReplaceAdvancedPrices', 'processCountExistingPrices', 'processCountNewPrices']);
$this->advancedPricing->expects($this->any())->method('retrieveOldSkus')->willReturn([]);
}
示例2: getFilterArray
protected function getFilterArray($expected)
{
$this->eavConfigMock->method('getEntityAttributeCodes')->with('catalog_product')->willReturn($expected['attribute_codes_array']);
$this->eavConfigMock->method('getAttribute')->with('catalog_product', $expected['attribute_code'])->willReturn($this->attributeMock);
$this->attributeMock->expects($this->exactly($expected['getId_count']))->method('getId')->willReturn($expected['getId']);
}