Commit 69053405 authored by alexpott's avatar alexpott

Issue #2567851 by dawehner, joelpittet: Use assertText() instead of...

Issue #2567851 by dawehner, joelpittet: Use assertText() instead of t()/SafeMarkup::format() in NodeEditFormTest
parent 4eaec816
......@@ -77,9 +77,10 @@ public function testNodeEdit() {
$this->assertUrl($node->url('edit-form', ['absolute' => TRUE]));
// Check that the title and body fields are displayed with the correct values.
$active = '<span class="visually-hidden">' . t('(active tab)') . '</span>';
$link_text = t('!local-task-title!active', array('!local-task-title' => t('Edit'), '!active' => $active));
$this->assertText(strip_tags($link_text), 0, 'Edit tab found and marked active.');
// As you see the expected link text has no HTML, but we are using
$link_text = 'Edit<span class="visually-hidden">(active tab)</span>';
// @todo Ideally assertLink would support HTML, but it doesn't.
$this->assertRaw($link_text, 'Edit tab found and marked active.');
$this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
$this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment