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


PHP FixtureInterface::getDataConfig方法代码示例

本文整理汇总了PHP中Magento\Mtf\Fixture\FixtureInterface::getDataConfig方法的典型用法代码示例。如果您正苦于以下问题:PHP FixtureInterface::getDataConfig方法的具体用法?PHP FixtureInterface::getDataConfig怎么用?PHP FixtureInterface::getDataConfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Mtf\Fixture\FixtureInterface的用法示例。


在下文中一共展示了FixtureInterface::getDataConfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: persist

 /**
  * Create product
  *
  * @param FixtureInterface $fixture [optional]
  * @return mixed|string
  */
 public function persist(FixtureInterface $fixture = null)
 {
     Factory::getApp()->magentoBackendLoginUser();
     $createProductPage = Factory::getPageFactory()->getCatalogProductNew();
     $createProductPage->open(['type' => $fixture->getDataConfig()['create_url_params']['type'], 'set' => $fixture->getDataConfig()['create_url_params']['set']]);
     $createProductPage->getProductForm()->fill($fixture);
     $createProductPage->getFormPageActions()->save();
     $createProductPage->getMessagesBlock()->waitSuccessMessage();
 }
开发者ID:,项目名称:,代码行数:15,代码来源:

示例2: persist

 /**
  * Post request for creating simple product.
  *
  * @param FixtureInterface|null $fixture [optional]
  * @return array
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  * @SuppressWarnings(PHPMD.CyclomaticComplexity)
  */
 public function persist(FixtureInterface $fixture = null)
 {
     $config = $fixture->getDataConfig();
     $prefix = isset($config['input_prefix']) ? $config['input_prefix'] : null;
     $data = $this->prepareData($fixture, $prefix);
     return $this->createProduct($data, $config);
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:16,代码来源:Curl.php

示例3: processAssert

 /**
  * Assert that duplicated product is found by sku and has correct product type, product template,
  * product status disabled and out of stock
  *
  * @param FixtureInterface $product
  * @param CatalogProductIndex $productGrid
  * @return void
  */
 public function processAssert(FixtureInterface $product, CatalogProductIndex $productGrid)
 {
     $config = $product->getDataConfig();
     $filter = ['name' => $product->getName(), 'visibility' => $product->getVisibility(), 'status' => 'Disabled', 'sku' => $product->getSku() . '-1', 'type' => ucfirst($config['create_url_params']['type']) . ' Product', 'price_to' => number_format($product->getPrice(), 2)];
     $productGrid->open()->getProductGrid()->search($filter);
     $filter['price_to'] = '$' . $filter['price_to'];
     \PHPUnit_Framework_Assert::assertTrue($productGrid->getProductGrid()->isRowVisible($filter, false), 'Product duplicate is absent in Products grid.');
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:16,代码来源:AssertProductDuplicatedInGrid.php

示例4: selectItem

 /**
  * Select order item.
  *
  * @param FixtureInterface $product
  * @reutrn void
  */
 public function selectItem(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $productConfig = $product->getDataConfig();
     if (isset($this->productsGrids[$productConfig['type_id']])) {
         $this->blockFactory->create($this->productsGrids[$productConfig['type_id']], ['element' => $this->_rootElement])->selectItem($product);
     } else {
         $this->searchAndSelect(['name' => $product->getName()]);
     }
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:16,代码来源:Grid.php

示例5: selectItem

 /**
  * Select order item.
  *
  * @param FixtureInterface $product
  * @reutrn void
  */
 public function selectItem(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $productConfig = $product->getDataConfig();
     $productType = isset($productConfig['type_id']) ? ucfirst($productConfig['type_id']) : '';
     $productGridClass = 'Enterprise\\Rma\\Test\\Block\\Adminhtml\\Rma\\NewRma\\Tab\\Items\\Order\\' . $productType . 'Grid';
     if (class_exists($productGridClass)) {
         $productGrid = $this->blockFactory->create($productGridClass, ['element' => $this->_rootElement]);
         $productGrid->selectItem($product);
     } else {
         $this->searchAndSelect(['name' => $product->getName()]);
     }
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:19,代码来源:Grid.php

示例6: getCartItem

 /**
  * Get cart item block
  *
  * @param FixtureInterface $product
  * @return CartItem
  */
 public function getCartItem(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $cartItem = null;
     if ($this->hasRender($typeId)) {
         $cartItem = $this->callRender($typeId, 'getCartItem', ['product' => $product]);
     } else {
         $cartItemBlock = $this->_rootElement->find(sprintf($this->cartItemByProductName, $product->getName()), Locator::SELECTOR_XPATH);
         $cartItem = $this->blockFactory->create('Magento\\Weee\\Test\\Block\\Cart\\CartItem', ['element' => $cartItemBlock]);
     }
     return $cartItem;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:19,代码来源:Cart.php

示例7: save

 /**
  * Click on "Save" button
  *
  * @param FixtureInterface|null $product [optional]
  * @return void
  */
 public function save(FixtureInterface $product = null)
 {
     $typeId = null;
     if ($product) {
         $dataConfig = $product->getDataConfig();
         $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     }
     if ($this->hasRender($typeId)) {
         $this->callRender($typeId, 'save', ['product' => $product]);
     } else {
         parent::save();
     }
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:19,代码来源:FormPageActions.php

示例8: fillOptions

 /**
  * Fill in the option specified for the product
  *
  * @param FixtureInterface $product
  * @return void
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fillOptions(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $checkoutData = null;
     /** @var CatalogProductSimple $product */
     if ($this->hasRender($typeId)) {
         $this->callRender($typeId, 'fillOptions', ['product' => $product]);
     }
     /** @var CatalogProductSimple $product */
     $checkoutData = $product->getCheckoutData();
     $checkoutCustomOptions = isset($checkoutData['options']['custom_options']) ? $checkoutData['options']['custom_options'] : [];
     $customOptions = $product->hasData('custom_options') ? $product->getDataFieldConfig('custom_options')['source']->getCustomOptions() : [];
     $checkoutCustomOptions = $this->prepareCheckoutData($customOptions, $checkoutCustomOptions);
     $this->getCustomOptionsBlock()->fillCustomOptions($checkoutCustomOptions);
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:24,代码来源:AbstractConfigureBlock.php

示例9: fill

 /**
  * Fill the product form.
  *
  * @param FixtureInterface $product
  * @param SimpleElement|null $element
  * @param FixtureInterface|null $category
  * @return $this
  * @throws \Exception
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null)
 {
     $this->waitPageToLoad();
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     if ($this->hasRender($typeId)) {
         $renderArguments = ['product' => $product, 'element' => $element, 'category' => $category];
         $this->callRender($typeId, 'fill', $renderArguments);
     } else {
         $sections = $this->getFixtureFieldsByContainers($product);
         if ($category) {
             $sections['product-details']['category_ids']['value'] = $category->getName();
         }
         $this->fillContainers($sections, $element);
     }
     return $this;
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:28,代码来源:ProductForm.php

示例10: getOptions

 /**
  * Return product options.
  *
  * @param FixtureInterface $product
  * @return array
  */
 public function getOptions(FixtureInterface $product)
 {
     /** @var CatalogProductSimple $product */
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     return $this->hasRender($typeId) ? $this->callRender($typeId, 'getOptions', ['product' => $product]) : $this->getCustomOptionsBlock()->getOptions($product);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:13,代码来源:View.php

示例11: getProductType

 /**
  * Get product type
  *
  * @return string
  */
 protected function getProductType()
 {
     $config = $this->product->getDataConfig();
     return ucfirst($config['type_id']) . ' Product';
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:10,代码来源:AssertProductInGrid.php

示例12: getProductType

 /**
  * Get product type.
  *
  * @param FixtureInterface $product
  * @return string|null
  */
 protected function getProductType(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     return isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:11,代码来源:ProductForm.php

示例13: createAndSaveProduct

 /**
  * Create and save product
  *
  * @param FixtureInterface $product
  * @return void
  */
 protected function createAndSaveProduct(FixtureInterface $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct($typeId);
     $this->catalogProductNew->getProductForm()->fill($product);
     $this->catalogProductNew->getFormPageActions()->save($product);
 }
开发者ID:,项目名称:,代码行数:15,代码来源:

示例14: fill

 /**
  * Fill the product form.
  *
  * @param FixtureInterface $product
  * @param SimpleElement|null $element [optional]
  * @param FixtureInterface|null $category [optional]
  * @return FormTabs
  *
  * @SuppressWarnings(PHPMD.NPathComplexity)
  */
 public function fill(FixtureInterface $product, SimpleElement $element = null, FixtureInterface $category = null)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     if ($this->hasRender($typeId)) {
         $renderArguments = ['product' => $product, 'element' => $element, 'category' => $category];
         $this->callRender($typeId, 'fill', $renderArguments);
     } else {
         $tabs = $this->getFieldsByTabs($product);
         if ($category) {
             $tabs['product-details']['category_ids']['value'] = $category->getName();
         }
         $this->showAdvancedSettings();
         $this->fillTabs($tabs, $element);
         if ($product->hasData('custom_attribute')) {
             $this->createCustomAttribute($product);
         }
     }
     return $this;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:30,代码来源:ProductForm.php

示例15: getCartItemClass

 /**
  * Get module name from fixture.
  *
  * @param FixtureInterface $product
  * @return string
  */
 protected function getCartItemClass(FixtureInterface $product)
 {
     $typeId = $product->getDataConfig()['type_id'];
     return ObjectManager::getInstance()->create($this->itemRender[$typeId], ['product' => $product]);
 }
开发者ID:chucky515,项目名称:Magento-CE-Mirror,代码行数:11,代码来源:Items.php


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