You are here

public function FlattenTest::testFlatten in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/process/FlattenTest.php \Drupal\Tests\migrate\Unit\process\FlattenTest::testFlatten()
  2. 9 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 28

Class

FlattenTest
Tests the flatten plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testFlatten($value, $expected) {
  $flattened = $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
  $this
    ->assertSame($expected, $flattened);
}