3 namespace Drupal\Tests\migrate\Unit\process;
5 use Drupal\migrate\Plugin\migrate\process\Flatten;
8 * Tests the flatten plugin.
12 class FlattenTest extends MigrateProcessTestCase {
15 * Test that various array flatten operations work properly.
17 public function testFlatten() {
18 $plugin = new Flatten([], 'flatten', []);
19 $flattened = $plugin->transform([1, 2, [3, 4, [5]], [], [7, 8]], $this->migrateExecutable, $this->row, 'destinationproperty');
20 $this->assertSame([1, 2, 3, 4, 5, 7, 8], $flattened);