function MigrateNodeTitleLabelTest::assertEntity

Same name in other branches
  1. 9 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::assertEntity()
  2. 10 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTitleLabelTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeTitleLabelTest::assertEntity()
  3. 11.x 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());
}

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