You are here

public function ExtractTest::testExtractFail in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractFail()
  2. 10 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractFail()

Tests unsuccessful extraction.

File

core/modules/migrate/tests/src/Unit/process/ExtractTest.php, line 43

Class

ExtractTest
@coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExtractFail() {
  $this
    ->expectException(MigrateException::class);
  $this
    ->expectExceptionMessage('Array index missing, extraction failed.');
  $this->plugin
    ->transform([
    'bar' => 'foo',
  ], $this->migrateExecutable, $this->row, 'destination_property');
}