function MenuTreeDataTestCase::assertSameLink

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

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.