function FlattenTest::testFlatten
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::testFlatten()
- 8.9.x core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::testFlatten()
- 11.x core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::testFlatten()
Tests that various array flatten operations work properly.
@dataProvider providerTestFlatten
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ FlattenTest.php, line 30
Class
- FlattenTest
- Tests the flatten plugin.
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testFlatten($value, $expected) : void {
$flattened = $this->plugin
->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame($expected, $flattened);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.