本文整理汇总了PHP中Magento\Mtf\Fixture\FixtureInterface::getTargetPath方法的典型用法代码示例。如果您正苦于以下问题:PHP FixtureInterface::getTargetPath方法的具体用法?PHP FixtureInterface::getTargetPath怎么用?PHP FixtureInterface::getTargetPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Mtf\Fixture\FixtureInterface
的用法示例。
在下文中一共展示了FixtureInterface::getTargetPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: persist
/**
* Post request for creating url rewrite
*
* @param FixtureInterface $fixture
* @throws \Exception
* @return void
*/
public function persist(FixtureInterface $fixture = null)
{
$url = $_ENV['app_backend_url'] . $this->url . $fixture->getTargetPath();
$data = $this->replaceMappingData($fixture->getData());
$curl = new BackendDecorator(new CurlTransport(), $this->_configuration);
$curl->write(CurlInterface::POST, $url, '1.0', [], $data);
$response = $curl->read();
if (!strpos($response, 'data-ui-id="messages-message-success"')) {
throw new \Exception("URL Rewrite creation by curl handler was not successful! Response: {$response}");
}
$curl->close();
}