You are here

protected function MigrateIngredient71Test::assertEntity in Recipe 8.2

Asserts various aspects of an ingredient.

Parameters

string $id: The ingredient ID.

string $label: The ingredient name.

1 call to MigrateIngredient71Test::assertEntity()
MigrateIngredient71Test::testIngredient in modules/ingredient/tests/src/Kernel/Migrate/recipe71/MigrateIngredient71Test.php
Tests the Drupal 7 ingredient to Drupal 8 migration.

File

modules/ingredient/tests/src/Kernel/Migrate/recipe71/MigrateIngredient71Test.php, line 38

Class

MigrateIngredient71Test
@covers \Drupal\ingredient\Plugin\migrate\destination\EntityIngredient @covers \Drupal\ingredient\Plugin\migrate\source\recipe1x\Ingredient @group recipe

Namespace

Drupal\Tests\ingredient\Kernel\Migrate\recipe71

Code

protected function assertEntity($id, $label) {

  /** @var \Drupal\ingredient\IngredientInterface $ingredient */
  $ingredient = Ingredient::load($id);
  $this
    ->assertTrue($ingredient instanceof IngredientInterface);
  $this
    ->assertSame($label, $ingredient
    ->label());
}