public function TextFieldTest::testProcessBooleanTextImplicitValues in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/text/tests/src/Unit/Migrate/TextFieldTest.php \Drupal\Tests\text\Unit\Migrate\TextFieldTest::testProcessBooleanTextImplicitValues()
@covers ::processCckFieldValues
File
- core/
modules/ text/ tests/ src/ Unit/ Migrate/ TextFieldTest.php, line 78 - Contains \Drupal\Tests\text\Unit\Migrate\TextFieldTest.
Class
- TextFieldTest
- @coversDefaultClass \Drupal\text\Plugin\migrate\cckfield\TextField @group text
Namespace
Drupal\Tests\text\Unit\MigrateCode
public function testProcessBooleanTextImplicitValues() {
$info = array(
'widget_type' => 'optionwidgets_onoff',
'global_settings' => array(
'allowed_values' => "foo\nbar",
),
);
$this->plugin
->processCckFieldValues($this->migration, 'field', $info);
$expected = [
'value' => [
'plugin' => 'static_map',
'source' => 'value',
'default_value' => 0,
'map' => [
'bar' => 1,
],
],
];
$this
->assertSame($expected, $this->migration
->getProcess()['process']);
}