本文整理匯總了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);
}