本文整理汇总了PHP中Shopware\Tests\Mink\Helper::convertTableHashToArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::convertTableHashToArray方法的具体用法?PHP Helper::convertTableHashToArray怎么用?PHP Helper::convertTableHashToArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::convertTableHashToArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: openListing
/**
* Opens the listing page
* @param array $params
* @param bool $autoPage
*/
public function openListing(array $params, $autoPage = true)
{
$parameters = array_merge(['sCategory' => 3], $autoPage ? ['sPage' => 1] : [], Helper::convertTableHashToArray($params, 'parameter'));
$categoryId = array_shift($parameters);
$this->path = $this->basePath . '?' . http_build_query($parameters);
$parameters['sCategory'] = $categoryId;
$this->open($parameters);
}
示例2: theArticleOnPositionShouldHaveThisProperties
/**
* @Then /^the article on position (?P<num>\d+) should have this properties:$/
*/
public function theArticleOnPositionShouldHaveThisProperties($position, TableNode $properties)
{
/** @var Listing $page */
$page = $this->getPage('Listing');
/** @var ArticleBox $articleBox */
$articleBox = $this->getMultipleElement($page, 'ArticleBox', $position);
$properties = Helper::convertTableHashToArray($properties->getHash());
$page->checkArticleBox($articleBox, $properties);
}
示例3: checkArticle
/**
* Checks an emotion article element
* @param Article $article
* @param array $data
*/
public function checkArticle(Article $article, array $data)
{
$properties = Helper::convertTableHashToArray($data);
$properties = Helper::floatArray($properties, ['price']);
$result = Helper::assertElementProperties($article, $properties);
if ($result === true) {
return;
}
$message = sprintf('The article %s is "%s" (should be "%s")', $result['key'], $result['value'], $result['value2']);
Helper::throwException($message);
}