You are here

public function FieldTypeDefaultsTest::testDefaultsException in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldTypeDefaultsTest::testDefaultsException()
  2. 9 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php \Drupal\Tests\field\Unit\Plugin\migrate\process\d6\FieldTypeDefaultsTest::testDefaultsException()

Tests an exception is thrown when the input is not a date field.

@covers ::transform

File

core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php, line 49

Class

FieldTypeDefaultsTest
Tests D6 fields defaults.

Namespace

Drupal\Tests\field\Unit\Plugin\migrate\process\d6

Code

public function testDefaultsException() {
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage(sprintf('Failed to lookup field type %s in the static map.', var_export([], TRUE)));
  $this->plugin
    ->transform([], $this->migrateExecutable, $this->row, 'property');
}