protected function TreeDataUnitTest::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 TreeDataUnitTest::assertSameLink()
TreeDataUnitTest::testMenuTreeData in drupal/core/modules/system/lib/Drupal/system/Tests/Menu/TreeDataUnitTest.php
Validate the generation of a proper menu tree hierarchy.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Menu/TreeDataUnitTest.php, line 65
Definition of Drupal\system\Tests\Menu\TreeDataUnitTest.

Class

TreeDataUnitTest
Menu tree data related tests.

Namespace

Drupal\system\Tests\Menu

Code

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