Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / modules / migrate / tests / src / Unit / process / FlattenTest.php
1 <?php
2
3 namespace Drupal\Tests\migrate\Unit\process;
4
5 use Drupal\migrate\Plugin\migrate\process\Flatten;
6
7 /**
8  * Tests the flatten plugin.
9  *
10  * @group migrate
11  */
12 class FlattenTest extends MigrateProcessTestCase {
13
14   /**
15    * Test that various array flatten operations work properly.
16    */
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);
21   }
22
23 }