function ShortcutTestCase::getShortcutInformation

7.x shortcut.test ShortcutTestCase::getShortcutInformation($set, $key)

Extracts information from shortcut set links.

Parameters

object $set: The shortcut set object to extract information from.

string $key: The array key indicating what information to extract from each link:

  • 'link_path': Extract link paths.
  • 'link_title': Extract link titles.
  • 'mlid': Extract the menu link item ID numbers.

Return value

array Array of the requested information from each link.

5 calls to ShortcutTestCase::getShortcutInformation()
ShortcutLinksTestCase::testShortcutLinkAdd in drupal-7.x/modules/shortcut/shortcut.test
Tests that creating a shortcut works properly.
ShortcutLinksTestCase::testShortcutLinkChangePath in drupal-7.x/modules/shortcut/shortcut.test
Tests that changing the path of a shortcut link works.
ShortcutLinksTestCase::testShortcutLinkDelete in drupal-7.x/modules/shortcut/shortcut.test
Tests deleting a shortcut link.
ShortcutLinksTestCase::testShortcutLinkRename in drupal-7.x/modules/shortcut/shortcut.test
Tests that shortcut links can be renamed.
ShortcutSetsTestCase::testShortcutSetSave in drupal-7.x/modules/shortcut/shortcut.test
Tests that shortcut_set_save() correctly updates existing links.

File

drupal-7.x/modules/shortcut/shortcut.test, line 90
Tests for shortcut.module.

Class

ShortcutTestCase
Defines base class for shortcut test cases.

Code

function getShortcutInformation($set, $key) {
  $info = array();
  foreach ($set->links as $link) {
    $info[] = $link[$key];
  }
  return $info;
}