function DateFieldTest::testDefineValueProcessPipelineException

Same name in other branches
  1. 9 core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php \Drupal\Tests\datetime\Unit\Plugin\migrate\field\DateFieldTest::testDefineValueProcessPipelineException()
  2. 8.9.x core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php \Drupal\Tests\datetime\Unit\Plugin\migrate\field\DateFieldTest::testDefineValueProcessPipelineException()
  3. 10 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 137

Class

DateFieldTest
Provides unit tests for the DateField Plugin.

Namespace

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

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.