public function TextCckTest::testProcessBooleanTextImplicitValues in Drupal 8
Same name in this branch
- 8 core/modules/text/tests/src/Unit/Migrate/TextCckTest.php \Drupal\Tests\text\Unit\Migrate\TextCckTest::testProcessBooleanTextImplicitValues()
- 8 core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php \Drupal\Tests\text\Unit\Plugin\migrate\cckfield\TextCckTest::testProcessBooleanTextImplicitValues()
@covers ::processCckFieldValues
File
- core/
modules/ text/ tests/ src/ Unit/ Migrate/ TextCckTest.php, line 74
Class
- TextCckTest
- @coversDefaultClass \Drupal\text\Plugin\migrate\cckfield\TextField @group text @group legacy
Namespace
Drupal\Tests\text\Unit\MigrateCode
public function testProcessBooleanTextImplicitValues() {
$info = [
'widget_type' => 'optionwidgets_onoff',
'global_settings' => [
'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']);
}