本文整理匯總了PHP中Shopware\Tests\Mink\Helper::getElementProperty方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper::getElementProperty方法的具體用法?PHP Helper::getElementProperty怎麽用?PHP Helper::getElementProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::getElementProperty方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: checkAddress
/**
* @param string $type
* @param string $address
*/
public function checkAddress($type, $address)
{
$this->open();
$testAddress = explode(', ', $address);
$testAddress = array_filter($testAddress);
$testAddress = array_values($testAddress);
$type = strtolower($type);
$type = ucfirst($type);
$addressBox = $this->getElement('Account' . $type);
$addressData = Helper::getElementProperty($addressBox, 'address');
$givenAddress = array();
/** @var Element $data */
foreach ($addressData as $data) {
$part = $data->getHtml();
$parts = explode('<br />', $part);
foreach ($parts as &$part) {
$part = strip_tags($part);
$part = str_replace(array(chr(0x9), ' '), ' ', $part);
$part = str_replace(array(chr(0x9), ' '), ' ', $part);
$part = trim($part);
}
unset($part);
$givenAddress = array_merge($givenAddress, $parts);
}
$result = Helper::compareArrays($givenAddress, $testAddress);
if ($result === true) {
return;
}
$message = sprintf('The addresses are different! ("%s" not was found in "%s")', $result['value2'], $result['value']);
Helper::throwException($message);
}