Issue #2386325 by Gábor Hojtsy: Recurring config schema problems with datetime and link field values in migrate tests
parent
d4e03f2398
commit
a029bf537d
|
@ -60,7 +60,7 @@ field.field_settings.link:
|
|||
type: integer
|
||||
label: 'Allowed link type'
|
||||
|
||||
field.link.value:
|
||||
field.value.link:
|
||||
type: mapping
|
||||
label: 'Default value'
|
||||
mapping:
|
||||
|
|
|
@ -42,7 +42,8 @@ class FieldInstanceDefaults extends ProcessPluginBase {
|
|||
|
||||
case 'date_select':
|
||||
if (!empty($widget_settings['default_value'])) {
|
||||
$default['value'] = $widget_settings['default_value'];
|
||||
$default['default_date_type'] = 'relative';
|
||||
$default['default_date'] = $widget_settings['default_value'];
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -19,6 +19,15 @@ use Drupal\link\LinkItemInterface;
|
|||
*/
|
||||
class MigrateFieldInstanceTest extends MigrateDrupalTestBase {
|
||||
|
||||
/**
|
||||
* Set to TRUE to strict check all configuration saved.
|
||||
*
|
||||
* @see \Drupal\Core\Config\Testing\ConfigSchemaChecker
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $strictConfigSchema = TRUE;
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
*
|
||||
|
@ -144,7 +153,6 @@ class MigrateFieldInstanceTest extends MigrateDrupalTestBase {
|
|||
$this->assertEqual($field->getSettings(), $expected);
|
||||
$this->assertEqual('default link title', $entity->field_test_link->title, 'Field field_test_link default title is correct.');
|
||||
$this->assertEqual('http://drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue