You are here

public function StaticMapTest::testMapWithInvalidSourceAndBypass in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/migrate/tests/src/Unit/process/StaticMapTest.php \Drupal\Tests\migrate\Unit\process\StaticMapTest::testMapWithInvalidSourceAndBypass()

Tests when the source is invalid and bypass is enabled.

@expectedException \Drupal\migrate\MigrateException @expectedExceptionMessage Setting both default_value and bypass is invalid.

File

core/modules/migrate/tests/src/Unit/process/StaticMapTest.php, line 78
Contains \Drupal\Tests\migrate\Unit\process\StaticMapTest.

Class

StaticMapTest
Tests the static map process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testMapWithInvalidSourceAndBypass() {
  $configuration['map']['foo']['bar'] = 'baz';
  $configuration['default_value'] = 'test';
  $configuration['bypass'] = TRUE;
  $this->plugin = new StaticMap($configuration, 'map', array());
  $this->plugin
    ->transform(array(
    'bar',
  ), $this->migrateExecutable, $this->row, 'destinationproperty');
}