You are here

protected function MigrateIngredient61Test::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 MigrateIngredient61Test::assertEntity()
MigrateIngredient61Test::testIngredient in modules/ingredient/tests/src/Kernel/Migrate/recipe61/MigrateIngredient61Test.php
Tests the Drupal 6 ingredient to Drupal 8 migration.

File

modules/ingredient/tests/src/Kernel/Migrate/recipe61/MigrateIngredient61Test.php, line 38

Class

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

Namespace

Drupal\Tests\ingredient\Kernel\Migrate\recipe61

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());
}