public function DedupeEntityTest::testDedupeEntityInvalidLength in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/process/DedupeEntityTest.php \Drupal\Tests\migrate\Unit\process\DedupeEntityTest::testDedupeEntityInvalidLength()
Tests that invalid length option throws an exception.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ DedupeEntityTest.php, line 99 - Contains \Drupal\Tests\migrate\Unit\process\DedupeEntityTest.
Class
- DedupeEntityTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\DedupeEntity @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testDedupeEntityInvalidLength() {
$configuration = array(
'entity_type' => 'test_entity_type',
'field' => 'test_field',
'length' => 'foobar',
);
$plugin = new DedupeEntity($configuration, 'dedupe_entity', array(), $this
->getMigration(), $this->entityQueryFactory);
$this
->setExpectedException('Drupal\\migrate\\MigrateException', 'The character length configuration key should be an integer. Omit this key to capture the entire string.');
$plugin
->transform('test_length', $this->migrateExecutable, $this->row, 'testproperty');
}