function ExplodeTest::testChainedTransform

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

Test if the explode process can be chained with a 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('foo,bar,tik', $this->migrateExecutable, $this->row, 'destination_property');
    $concat = new Concat([], 'map', []);
    $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destination_property');
    $this->assertSame('foobartik', $concatenated);
}

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