You are here

function EntityTranslationMenuTranslationTestCase::assertLinkWithTitleAttribute in Entity Translation 7

Asserts a link with a given label and title is found in the page.

1 call to EntityTranslationMenuTranslationTestCase::assertLinkWithTitleAttribute()
EntityTranslationMenuTranslationTestCase::testMenuLocalization in entity_translation_i18n_menu/entity_translation_i18n_menu.test
Test if menu localization works.

File

entity_translation_i18n_menu/entity_translation_i18n_menu.test, line 131
Tests for Entity translation module.

Class

EntityTranslationMenuTranslationTestCase
Tests for the translation of menu items on entity forms.

Code

function assertLinkWithTitleAttribute($label, $title) {
  $links = $this
    ->xpath('//a[normalize-space(text())=:label and normalize-space(@title)=:title]', array(
    ':label' => $label,
    ':title' => $title,
  ));
  $this
    ->assert(isset($links[0]));
}