function NullCoalesceTest::testExceptionOnInvalidValue

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::testExceptionOnInvalidValue()
  2. 10 core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::testExceptionOnInvalidValue()
  3. 11.x core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php \Drupal\Tests\migrate\Unit\process\NullCoalesceTest::testExceptionOnInvalidValue()

Tests that an exception is thrown for a non-array value.

@covers ::transform

File

core/modules/migrate/tests/src/Unit/process/NullCoalesceTest.php, line 22

Class

NullCoalesceTest
Tests the null_coalesce process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function testExceptionOnInvalidValue() {
    $this->expectException(MigrateException::class);
    (new NullCoalesce([], 'null_coalesce', []))->transform('invalid', $this->migrateExecutable, $this->row, 'destination_property');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.