You are here

public function SingleValueTest::testTreatAsSingle in Migrate Plus 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Unit/process/SingleValueTest.php \Drupal\Tests\migrate_plus\Unit\process\SingleValueTest::testTreatAsSingle()

Test input treated as single value output.

File

tests/src/Unit/process/SingleValueTest.php, line 25

Class

SingleValueTest
@coversDefaultClass \Drupal\migrate_plus\Plugin\migrate\process\SingleValue @group migrate

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testTreatAsSingle() : void {
  $value = [
    'v1',
    'v2',
    'v3',
  ];
  $output = $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'destinationproperty');
  $this
    ->assertSame($output, $value);
  $this
    ->assertFalse($this->plugin
    ->multiple());
}