|
@@ 34-43 (lines=10) @@
|
| 31 |
|
$contactElements = $label->getParent()->findAll('css', '.contact-collection-element'); |
| 32 |
|
|
| 33 |
|
/** @var NodeElement $contactElement */ |
| 34 |
|
foreach ($contactElements as $contactElement) { |
| 35 |
|
if (false !== stripos($contactElement->getText(), $value)) { |
| 36 |
|
self::assertTrue( |
| 37 |
|
$contactElement->hasClass('primary'), |
| 38 |
|
sprintf('Value "%s" was found but it is not primary', $value) |
| 39 |
|
); |
| 40 |
|
|
| 41 |
|
return; |
| 42 |
|
} |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
self::fail(sprintf('Value "%s" in "%s" field not found', $value, $field)); |
| 46 |
|
} |
|
@@ 218-228 (lines=11) @@
|
| 215 |
|
$addresses = $this->getSession()->getPage()->findAll('css', 'div.map-address-list .map-item'); |
| 216 |
|
|
| 217 |
|
/** @var NodeElement $actualAddress */ |
| 218 |
|
foreach ($addresses as $actualAddress) { |
| 219 |
|
if (false !== stripos($actualAddress->getText(), $address)) { |
| 220 |
|
self::assertEquals( |
| 221 |
|
'Primary', |
| 222 |
|
$actualAddress->find('css', 'ul.inline')->getText(), |
| 223 |
|
sprintf('Address "%s" was found but it is not primary', $address) |
| 224 |
|
); |
| 225 |
|
|
| 226 |
|
return; |
| 227 |
|
} |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
self::fail(sprintf('Address "%s" not found', $address)); |
| 231 |
|
} |