You are here

public function DateFieldTest::testDefineValueProcessPipelineException in Drupal 10

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

Tests invalid date types throw an exception.

@covers ::defineValueProcessPipeline

File

core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php, line 135

Class

DateFieldTest
Provides unit tests for the DateField Plugin.

Namespace

Drupal\Tests\datetime\Unit\Plugin\migrate\field

Code

public function testDefineValueProcessPipelineException() {
  $migration = $this
    ->createMock('Drupal\\migrate\\Plugin\\MigrationInterface');
  $plugin = new DateField([], '', []);
  $this
    ->expectException(MigrateException::class);
  $plugin
    ->defineValueProcessPipeline($migration, 'field_date', [
    'type' => 'test',
  ]);
}