function ExplodeTest::testExplodeWithNonStrictAndEmptySource
Same name in other branches
- 8.9.x core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithNonStrictAndEmptySource()
- 10 core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\ExplodeTest::testExplodeWithNonStrictAndEmptySource()
- 11.x core/modules/migrate/tests/src/Unit/process/ExplodeTest.php \Drupal\Tests\migrate\Unit\process\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 69
Class
- ExplodeTest
- Tests the Explode process plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExplodeWithNonStrictAndEmptySource($value, $expected) {
$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.