You are here

protected function MenuTreeDataTestCase::assertSameLink in SimpleTest 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 tests/menu.test
Validate the generation of a proper menu tree hierarchy.

File

tests/menu.test, line 335
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 : t('First link is identical to second link'));
}