function ExplodeTest::testExplodeWithEmptyDelimiter

Tests explode fails with empty delimiter.

File

core/modules/migrate/tests/src/Unit/process/ExplodeTest.php, line 114

Class

ExplodeTest
Tests the Explode process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExplodeWithEmptyDelimiter() {
  $this->expectException(MigrateException::class);
  $this->expectExceptionMessage('delimiter is empty');
  $plugin = new Explode([
    'delimiter' => '',
  ], 'map', []);
  $plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destination_property');
}

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