function ExplodeTest::testExplodeWithNonStrictAndEmptySource
Tests that explode works on non-strings but with strict set to FALSE.
@dataProvider providerExplodeWithNonStrictAndEmptySource
File
- 
              core/
modules/ migrate/ tests/ src/ Unit/ process/ ExplodeTest.php, line 71  
Class
- ExplodeTest
 - Tests the Explode process plugin.
 
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExplodeWithNonStrictAndEmptySource($value, $expected) : void {
  $plugin = new Explode([
    'delimiter' => '|',
    'strict' => FALSE,
  ], 'map', []);
  $processed = $plugin->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
  $this->assertSame($expected, $processed);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.