You are here

public function SkipOnValueTest::testProcessBypassesOnMultipleNonValue in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/process/SkipOnValueTest.php \Drupal\Tests\migrate_plus\Unit\process\SkipOnValueTest::testProcessBypassesOnMultipleNonValue()

@covers ::process

File

tests/src/Unit/process/SkipOnValueTest.php, line 71

Class

SkipOnValueTest
Tests the skip on value process plugin.

Namespace

Drupal\Tests\migrate_plus\Unit\process

Code

public function testProcessBypassesOnMultipleNonValue() {
  $configuration['method'] = 'process';
  $configuration['value'] = [
    1,
    1,
    2,
    3,
    5,
    8,
  ];
  $configuration['not_equals'] = TRUE;
  $value = (new SkipOnValue($configuration, 'skip_on_value', []))
    ->transform(5, $this->migrateExecutable, $this->row, 'destinationproperty');
  $this
    ->assertEquals($value, '5');
  $value = (new SkipOnValue($configuration, 'skip_on_value', []))
    ->transform(1, $this->migrateExecutable, $this->row, 'destinationproperty');
  $this
    ->assertEquals($value, '1');
}