You are here

public function ExplodeTest::testChainedTransform in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testChainedTransform()
  2. 9 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 47

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);
}