function ShortcutLinksTest::testShortcutQuickLink

Tests that the "add to shortcut" link changes to "remove shortcut".

File

drupal/core/modules/shortcut/lib/Drupal/shortcut/Tests/ShortcutLinksTest.php, line 65
Definition of Drupal\shortcut\Tests\ShortcutLinksTest.

Class

ShortcutLinksTest
Defines shortcut links test cases.

Namespace

Drupal\shortcut\Tests

Code

function testShortcutQuickLink() {
  theme_enable(array(
    'seven',
  ));
  config('system.theme')
    ->set('admin', 'seven')
    ->save();
  variable_set('node_admin_theme', TRUE);
  $link = reset($this->set->links);
  $this
    ->drupalGet($link->link_path);
  $this
    ->assertRaw(t('Remove from %title shortcuts', array(
    '%title' => $this->set
      ->label(),
  )), '"Add to shortcuts" link properly switched to "Remove from shortcuts".');
}