function ExplodeTest::testChainedTransform

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

Tests if the explode process can be chained with handles_multiple process.

File

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

Class

ExplodeTest
Tests the Explode process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testChainedTransform() {
    $exploded = $this->plugin
        ->transform('One,Two,Three', $this->migrateExecutable, $this->row, 'destination_property');
    $concat = new Concat([], 'map', []);
    $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame('OneTwoThree', $concatenated);
}

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