public function ExtractTest::testExtractFailDefault in Drupal 8
Same name and namespace in other branches
- 9 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 52
Class
- ExtractTest
- @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @group migrate
Namespace
Drupal\Tests\migrate\Unit\processCode
public function testExtractFailDefault() {
$plugin = new Extract([
'index' => [
'foo',
],
'default' => 'test',
], 'map', []);
$value = $plugin
->transform([
'bar' => 'foo',
], $this->migrateExecutable, $this->row, 'destination_property');
$this
->assertSame('test', $value, '');
}