private function LinkAttributeCrudTest::assertLinkOnNode in Link 6.2
6 calls to LinkAttributeCrudTest::assertLinkOnNode()
- LinkAttributeCrudTest::testBasic in tests/
link.attribute.test - A simple test that just creates a new node type, adds a link field to it, creates a new node of that type, and makes sure that the node is being displayed.
- LinkAttributeCrudTest::testLinkWithClassOnField in tests/
link.attribute.test - This test sees that we can create a link field with a defined class, and make sure that class displays properly when the link is displayed.
- LinkAttributeCrudTest::testLinkWithNoFollowOnField in tests/
link.attribute.test - LinkAttributeCrudTest::testLinkWithNoFollowOnFieldTargetNewWindow in tests/
link.attribute.test - LinkAttributeCrudTest::testLinkWithNoFollowOnFieldTargetNewWindowAndAClass in tests/
link.attribute.test - Trying to reproduce exactly what's in issue #664990
File
- tests/
link.attribute.test, line 63 - Basic simpletests to test options on link module.
Class
Code
private 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);
}