本文整理汇总了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.');
}
示例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();
}
示例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());
}
示例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;
}
示例5: getProductType
/**
* Get product type
*
* @return string
*/
protected function getProductType()
{
$config = $this->product->getDataConfig();
return ucfirst($config['type_id']) . ' Product';
}
示例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;
}
示例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;
}