本文整理汇总了PHP中Magento\Mtf\Fixture\FixtureInterface::getUrlParams方法的典型用法代码示例。如果您正苦于以下问题:PHP FixtureInterface::getUrlParams方法的具体用法?PHP FixtureInterface::getUrlParams怎么用?PHP FixtureInterface::getUrlParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Mtf\Fixture\FixtureInterface
的用法示例。
在下文中一共展示了FixtureInterface::getUrlParams方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: persist
/**
* Create configurable product
*
* @param FixtureInterface $fixture [optional]
* @return mixed|string
* @throws \Exception
*/
public function persist(FixtureInterface $fixture = null)
{
$url = $_ENV['app_backend_url'] . 'catalog/product/save/' . $fixture->getUrlParams('create_url_params') . '/popup/1/back/edit';
$params = $this->_prepareData($fixture);
$curl = new BackendDecorator(new CurlTransport(), new Config());
$curl->addOption(CURLOPT_HEADER, 1);
$curl->write(CurlInterface::POST, $url, '1.0', [], $params);
$response = $curl->read();
$curl->close();
if (!strpos($response, 'data-ui-id="messages-message-success"')) {
throw new \Exception("Product creation by curl handler was not successful! Response: {$response}");
}
preg_match("~Location: [^\\s]*\\/id\\/(\\d+)~", $response, $matches);
return isset($matches[1]) ? $matches[1] : null;
}