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',
  ));
  variable_set('admin_theme', 'seven');
  variable_set('node_admin_theme', TRUE);
  $this
    ->drupalGet($this->set->links[0]['link_path']);
  $this
    ->assertRaw(t('Remove from %title shortcuts', array(
    '%title' => $this->set->title,
  )), '"Add to shortcuts" link properly switched to "Remove from shortcuts".');
}