You are here

protected function MigrateMenuTest::assertEntity in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateMenuTest::assertEntity()
  2. 10 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateMenuTest::assertEntity()

Asserts various aspects of a menu.

Parameters

$id: The menu ID.

string $language: The menu language.

$label: The menu label.

$description: The menu description.

1 call to MigrateMenuTest::assertEntity()
MigrateMenuTest::testMenu in core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php
Tests the Drupal 7 menu to Drupal 8 migration.

File

core/modules/system/tests/src/Kernel/Migrate/d7/MigrateMenuTest.php, line 36

Class

MigrateMenuTest
Upgrade menus to system.menu.*.yml.

Namespace

Drupal\Tests\system\Kernel\Migrate\d7

Code

protected function assertEntity($id, $language, $label, $description) {
  $navigation_menu = Menu::load($id);
  $this
    ->assertSame($id, $navigation_menu
    ->id());
  $this
    ->assertSame($language, $navigation_menu
    ->language()
    ->getId());
  $this
    ->assertSame($label, $navigation_menu
    ->label());
  $this
    ->assertSame($description, $navigation_menu
    ->getDescription());
}