當前位置: 首頁>>代碼示例>>PHP>>正文


PHP InjectableFixture::getDataConfig方法代碼示例

本文整理匯總了PHP中Magento\Mtf\Fixture\InjectableFixture::getDataConfig方法的典型用法代碼示例。如果您正苦於以下問題:PHP InjectableFixture::getDataConfig方法的具體用法?PHP InjectableFixture::getDataConfig怎麽用?PHP InjectableFixture::getDataConfig使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Mtf\Fixture\InjectableFixture的用法示例。


在下文中一共展示了InjectableFixture::getDataConfig方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processAssert

 /**
  * Assert that duplicated product can be found in grid by type, template, status and stock status.
  *
  * @param InjectableFixture $product
  * @param CatalogProduct $productGrid
  * @return void
  */
 public function processAssert(InjectableFixture $product, CatalogProduct $productGrid)
 {
     $config = $product->getDataConfig();
     $filter = ['name' => $product->getName(), 'visibility' => $product->getVisibility(), 'status' => 'Disabled', 'type' => ucfirst($config['create_url_params']['type']) . ' Product', 'price_to' => number_format($product->getPrice(), 2)];
     $productGrid->open()->getProductGrid()->search($filter);
     \PHPUnit_Framework_Assert::assertTrue($productGrid->getProductGrid()->isRowVisible($filter, false, false), 'Product duplicate is absent in Products grid.');
 }
開發者ID:MikeTayC,項目名稱:magento.dev,代碼行數:14,代碼來源:AssertProductDuplicatedInGrid.php

示例2: prepareData

 /**
  * Prepare data for creating product request.
  *
  * @return void
  */
 protected function prepareData()
 {
     $config = $this->fixture->getDataConfig();
     $this->fields['product']['type_id'] = $config['type_id'];
     $this->prepareFpt();
     $this->prepareAdvancedInventory();
     $this->prepareTierPrice();
     $this->prepareCustomOptions();
 }
開發者ID:koliaGI,項目名稱:magento2,代碼行數:14,代碼來源:Webapi.php

示例3: getStockAvailability

 /**
  * Get text of Stock Availability control.
  *
  * @param InjectableFixture $product
  * @return string
  */
 public function getStockAvailability(InjectableFixture $product)
 {
     $dataConfig = $product->getDataConfig();
     $typeId = isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
     return $this->hasRender($typeId) ? $this->callRender($typeId, 'get' . ucfirst($typeId) . 'StockAvailability') : strtolower($this->_rootElement->find($this->stockAvailability)->getText());
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:12,代碼來源:View.php

示例4: prepareConfig

 /**
  * Prepare config data.
  *
  * @param InjectableFixture $product
  * @return array
  */
 protected function prepareConfig(InjectableFixture $product)
 {
     $config = $product->getDataConfig();
     if ($product->hasData('attribute_set_id')) {
         $config['create_url_params']['set'] = $product->getDataFieldConfig('attribute_set_id')['source']->getAttributeSet()->getAttributeSetId();
     }
     return $config;
 }
開發者ID:cewolf2002,項目名稱:magento,代碼行數:14,代碼來源:Curl.php

示例5: getProductType

 /**
  * Get product type
  *
  * @return string
  */
 protected function getProductType()
 {
     $config = $this->product->getDataConfig();
     return ucfirst($config['type_id']) . ' Product';
 }
開發者ID:chucky515,項目名稱:Magento-CE-Mirror,代碼行數:10,代碼來源:AssertProductInGrid.php

示例6: getCartItem

 /**
  * Get cart item block.
  *
  * @param InjectableFixture $product
  * @return CartItem
  */
 public function getCartItem(InjectableFixture $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($this->cartItemClass, ['element' => $cartItemBlock]);
     }
     return $cartItem;
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:19,代碼來源:Cart.php

示例7: getProductType

 /**
  * Get product type.
  *
  * @param InjectableFixture $product
  * @return string|null
  */
 protected function getProductType(InjectableFixture $product)
 {
     $dataConfig = $product->getDataConfig();
     return isset($dataConfig['type_id']) ? $dataConfig['type_id'] : null;
 }
開發者ID:hientruong90,項目名稱:ee_14_installer,代碼行數:11,代碼來源:ProductForm.php


注:本文中的Magento\Mtf\Fixture\InjectableFixture::getDataConfig方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。