You are here

protected function MigrateNodeTitleLabelTest::assertEntity in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::assertEntity()

Asserts various aspects of a base_field_override entity.

Parameters

string $id: The override ID.

string $label: The label's expected (overridden) value.

1 call to MigrateNodeTitleLabelTest::assertEntity()
MigrateNodeTitleLabelTest::testMigration in core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php
Tests migration of node title field overrides.

File

core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php, line 34

Class

MigrateNodeTitleLabelTest
Tests migration of the title field label for node types.

Namespace

Drupal\Tests\node\Kernel\Migrate\d7

Code

protected function assertEntity($id, $label) {
  $override = BaseFieldOverride::load($id);
  $this
    ->assertInstanceOf(BaseFieldOverride::class, $override);

  /** @var \Drupal\Core\Field\Entity\BaseFieldOverride $override */
  $this
    ->assertIdentical($label, $override
    ->getLabel());
}