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