Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / migrate_plus / tests / src / Unit / process / MultipleValuesTest.php
1 <?php
2
3 namespace Drupal\Tests\migrate_plus\Unit\process;
4
5 use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase;
6 use Drupal\migrate_plus\Plugin\migrate\process\MultipleValues;
7
8 /**
9  * @coversDefaultClass \Drupal\migrate_plus\Plugin\migrate\process\MultipleValues
10  * @group migrate
11  */
12 class MultipleValuesTest extends MigrateProcessTestCase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected function setUp() {
18     $this->plugin = new MultipleValues([], 'multiple_values', []);
19     parent::setUp();
20   }
21
22   /**
23    * Test input treated as multiple value output.
24    */
25   public function testTreatAsMultiple() {
26     $value = ['v1', 'v2', 'v3'];
27     $output = $this->plugin->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
28     $this->assertSame($output, $value);
29     $this->assertTrue($this->plugin->multiple());
30   }
31
32 }