public function MakeUniqueEntityFieldTest::testMakeUniqueEntityFieldEntityInvalidStart in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php \Drupal\Tests\migrate\Unit\process\MakeUniqueEntityFieldTest::testMakeUniqueEntityFieldEntityInvalidStart()
- 10 core/modules/migrate/tests/src/Unit/process/MakeUniqueEntityFieldTest.php \Drupal\Tests\migrate\Unit\process\MakeUniqueEntityFieldTest::testMakeUniqueEntityFieldEntityInvalidStart()
Tests that invalid start position throws an exception.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ MakeUniqueEntityFieldTest.php, line 86
Class
- MakeUniqueEntityFieldTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\MakeUniqueEntityField @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testMakeUniqueEntityFieldEntityInvalidStart() {
$configuration = [
'entity_type' => 'test_entity_type',
'field' => 'test_field',
'start' => 'foobar',
];
$plugin = new MakeUniqueEntityField($configuration, 'make_unique', [], $this
->getMigration(), $this->entityTypeManager);
$this
->expectException('Drupal\\migrate\\MigrateException');
$this
->expectExceptionMessage('The start position configuration key should be an integer. Omit this key to capture from the beginning of the string.');
$plugin
->transform('test_start', $this->migrateExecutable, $this->row, 'testproperty');
}