本文整理汇总了PHP中Shopware\Tests\Mink\Helper::assertElementProperties方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::assertElementProperties方法的具体用法?PHP Helper::assertElementProperties怎么用?PHP Helper::assertElementProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::assertElementProperties方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkOrderNumber
/**
* Helper method checks the order number
* @param AccountOrder $order
* @param string $orderNumber
*/
private function checkOrderNumber(AccountOrder $order, $orderNumber)
{
$properties = array('number' => $orderNumber);
$result = Helper::assertElementProperties($order, $properties);
if ($result === true) {
return;
}
$message = sprintf('The order number is "%s" (should be "%s")', $result['value'], $result['value2']);
Helper::throwException($message);
}
示例2: 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);
}
示例3: checkPaymentMethod
/**
* @param string $paymentMethod
* @throws \Behat\Behat\Exception\PendingException
* @throws \Exception
*/
public function checkPaymentMethod($paymentMethod)
{
/** @var CheckoutPayment $element */
$element = $this->getElement('CheckoutPayment');
$properties = array('paymentMethod' => $paymentMethod);
$result = Helper::assertElementProperties($element, $properties);
if ($result === true) {
return;
}
$message = sprintf('The current payment method is "%s" (should be "%s")', $result['value'], $result['value2']);
Helper::throwException($message);
}