Commit 9594553d authored by xjm's avatar xjm

Issue #2550963 by kgoel, akalata, josephdpurcell, justAChris: Remove or...

Issue #2550963 by kgoel, akalata, josephdpurcell, justAChris: Remove or document SafeMarkup::set in ShortcutSetsTest::testShortcutSetSwitchNoSetName
parent d2404bee
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
namespace Drupal\shortcut\Tests; namespace Drupal\shortcut\Tests;
use Drupal\Component\Utility\SafeMarkup;
use Drupal\shortcut\Entity\ShortcutSet; use Drupal\shortcut\Entity\ShortcutSet;
/** /**
...@@ -133,9 +132,7 @@ function testShortcutSetSwitchCreate() { ...@@ -133,9 +132,7 @@ function testShortcutSetSwitchCreate() {
function testShortcutSetSwitchNoSetName() { function testShortcutSetSwitchNoSetName() {
$edit = array('set' => 'new'); $edit = array('set' => 'new');
$this->drupalPostForm('user/' . $this->adminUser->id() . '/shortcuts', $edit, t('Change set')); $this->drupalPostForm('user/' . $this->adminUser->id() . '/shortcuts', $edit, t('Change set'));
$this->assertRaw(\Drupal::translation()->formatPlural(1, '1 error has been found: !errors', '@count errors have been found: !errors', [ $this->assertRaw('1 error has been found: <a href="#edit-label">Label</a>');
'!errors' => SafeMarkup::set('<a href="#edit-label">Label</a>')
]));
$current_set = shortcut_current_displayed_set($this->adminUser); $current_set = shortcut_current_displayed_set($this->adminUser);
$this->assertEqual($current_set->id(), $this->set->id(), 'Attempting to switch to a new shortcut set without providing a set name does not succeed.'); $this->assertEqual($current_set->id(), $this->set->id(), 'Attempting to switch to a new shortcut set without providing a set name does not succeed.');
$this->assertFieldByXPath("//input[@name='label' and contains(concat(' ', normalize-space(@class), ' '), ' error ')]", NULL, 'The new set label field has the error class'); $this->assertFieldByXPath("//input[@name='label' and contains(concat(' ', normalize-space(@class), ' '), ' error ')]", NULL, 'The new set label field has the error class');
......
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