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