当前位置: 首页>>代码示例>>PHP>>正文


PHP Config::method方法代码示例

本文整理汇总了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([]);
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:31,代码来源:AdvancedPricingTest.php

示例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']);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:6,代码来源:ProductImageTest.php


注:本文中的Magento\Eav\Model\Config::method方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。