protected function LinkFieldAttributesTest::assertLinkOnNode in Link 7
Assert Link On Node.
File
- tests/
LinkFieldAttributesTest.test, line 54 - Field attributes test.
Class
- LinkFieldAttributesTest
- Field attributes test.
Code
protected function assertLinkOnNode($field_name, $link_value, $message = '', $group = 'Other') {
$this->zebra++;
$zebra_string = $this->zebra % 2 == 0 ? 'even' : 'odd';
$cssFieldLocator = 'field-' . str_replace('_', '-', $field_name);
$this
->assertPattern('@<div class="field field-type-link ' . $cssFieldLocator . '".*<div class="field-item ' . $zebra_string . '">\\s*' . $link_value . '\\s*</div>@is', $message, $group);
}