public function TextFieldTest::testBooleanTextExplicitValueProcessPipeline in Drupal 10
Same name and namespace in other branches
- 8 core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php \Drupal\Tests\text\Unit\Migrate\d6\TextFieldTest::testBooleanTextExplicitValueProcessPipeline()
- 9 core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php \Drupal\Tests\text\Unit\Migrate\d6\TextFieldTest::testBooleanTextExplicitValueProcessPipeline()
@covers ::defineValueProcessPipeline
File
- core/
modules/ text/ tests/ src/ Unit/ Migrate/ d6/ TextFieldTest.php, line 100
Class
- TextFieldTest
- @coversDefaultClass \Drupal\text\Plugin\migrate\field\d6\TextField @group text
Namespace
Drupal\Tests\text\Unit\Migrate\d6Code
public function testBooleanTextExplicitValueProcessPipeline() {
$info = [
'widget_type' => 'optionwidgets_onoff',
'global_settings' => [
'allowed_values' => "foo|Foo\nbaz|Baz",
],
];
$this->plugin
->defineValueProcessPipeline($this->migration, 'field', $info);
$expected = [
'value' => [
'plugin' => 'static_map',
'source' => 'value',
'default_value' => 0,
'map' => [
'baz' => 1,
],
],
];
$this
->assertSame($expected, $this->migration
->getProcess()['process']);
}