function ExplodeTest::testExplodeWithStrictAndEmptyString

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithStrictAndEmptyString()
  2. 10 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithStrictAndEmptyString()
  3. 11.x core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithStrictAndEmptyString()

Tests Explode return values with an empty string and strict check.

File

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

Class

ExplodeTest
Tests the Explode process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExplodeWithStrictAndEmptyString() {
    $plugin = new Explode([
        'delimiter' => '|',
    ], 'map', []);
    $processed = $plugin->transform('', $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame([
        '',
    ], $processed);
}

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