You are here

public function MigrateRecipeDisplaySettings61Test::testMigration in Recipe 8.2

Tests migration of ingredient field instance variables.

File

tests/src/Kernel/Migrate/recipe61/MigrateRecipeDisplaySettings61Test.php, line 33

Class

MigrateRecipeDisplaySettings61Test
Tests migration of Recipe 6.x-1.x ingredient variables to configuration.

Namespace

Drupal\Tests\recipe\Kernel\Migrate\recipe61

Code

public function testMigration() {
  $display = EntityViewDisplay::load('node.recipe.default');
  $field_component = $display
    ->getComponent('recipe_ingredient');
  $this
    ->assertSame($field_component['settings']['fraction_format'], '{%d }%d/%d');
  $this
    ->assertSame($field_component['settings']['unit_display'], 1);
}