public function SubstrTest::testSubstrFail in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Unit/process/SubstrTest.php \Drupal\Tests\migrate\Unit\process\SubstrTest::testSubstrFail()
- 9 core/modules/migrate/tests/src/Unit/process/SubstrTest.php \Drupal\Tests\migrate\Unit\process\SubstrTest::testSubstrFail()
Tests invalid input type.
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ SubstrTest.php, line 62
Class
- SubstrTest
- Tests the substr plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testSubstrFail() {
$configuration = [];
$this->plugin = new Substr($configuration, 'map', []);
$this
->expectException(MigrateException::class);
$this
->expectExceptionMessage('The input value must be a string.');
$this->plugin
->transform([
'Captain Janeway',
], $this->migrateExecutable, $this->row, 'destination_property');
}