Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / migrate_plus / tests / src / Unit / process / SingleValueTest.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\SingleValue;
7
8 /**
9  * @coversDefaultClass \Drupal\migrate_plus\Plugin\migrate\process\SingleValue
10  * @group migrate
11  */
12 class SingleValueTest extends MigrateProcessTestCase {
13
14   /**
15    * {@inheritdoc}
16    */
17   protected function setUp() {
18     $this->plugin = new SingleValue([], 'single_value', []);
19     parent::setUp();
20   }
21
22   /**
23    * Test input treated as single value output.
24    */
25   public function testTreatAsSingle() {
26     $value = ['v1', 'v2', 'v3'];
27     $output = $this->plugin->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
28     $this->assertSame($output, $value);
29     $this->assertFalse($this->plugin->multiple());
30   }
31
32 }