You are here

protected function MenuTreeDataTestCase::assertSameLink in Drupal 7

Check that two menu links are the same by comparing the mlid.

Parameters

$link1: A menu link item.

$link2: A menu link item.

$message: The message to display along with the assertion.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

1 call to MenuTreeDataTestCase::assertSameLink()
MenuTreeDataTestCase::testMenuTreeData in modules/simpletest/tests/menu.test
Validate the generation of a proper menu tree hierarchy.

File

modules/simpletest/tests/menu.test, line 978
Provides SimpleTests for menu.inc.

Class

MenuTreeDataTestCase
Menu tree data related tests.

Code

protected function assertSameLink($link1, $link2, $message = '') {
  return $this
    ->assert($link1['mlid'] == $link2['mlid'], $message ? $message : 'First link is identical to second link');
}