public function ExtractTest::testExtractInvalid in Drupal 10
Same name and namespace in other branches
- 9 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractInvalid()
Tests invalid input.
@dataProvider providerTestExtractInvalid
File
- core/
modules/ migrate/ tests/ src/ Unit/ process/ ExtractTest.php, line 36
Class
- ExtractTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExtractInvalid($value) {
$this
->expectException(MigrateException::class);
$type = gettype($value);
$this
->expectExceptionMessage(sprintf("Input should be an array, instead it was of type '%s'", $type));
$this->plugin
->transform($value, $this->migrateExecutable, $this->row, 'destination_property');
}