1.20.x link.attribute.test | protected LinkAttributeCrudTest::assertLinkOnNode($field_name, $link_value, $message = '', $group = 'Other') |
File
- modules/
link/ tests/ link.attribute.test, line 18 - Basic simpletests to test options on link module.
Class
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);
}