function ExtractTest::testExtractFailDefault
Same name in other branches
- 9 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractFailDefault()
- 8.9.x core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractFailDefault()
- 10 core/modules/migrate/tests/src/Unit/process/ExtractTest.php \Drupal\Tests\migrate\Unit\process\ExtractTest::testExtractFailDefault()
Tests unsuccessful extraction.
File
-
core/
modules/ migrate/ tests/ src/ Unit/ process/ ExtractTest.php, line 57
Class
- ExtractTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExtractFailDefault() : void {
$plugin = new Extract([
'index' => [
'foo',
],
'default' => 'test',
], 'map', []);
$value = $plugin->transform([
'bar' => 'foo',
], $this->migrateExecutable, $this->row, 'destination_property');
$this->assertSame('test', $value, '');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.