Commit 1f2f2649 authored by alexpott's avatar alexpott

Issue #2572897 by phenaproxima: Promote and sticky options migrate to empty checkboxes

parent 08b1d335
......@@ -11,6 +11,9 @@ process:
entity_type: 'constants/entity_type'
bundle: type
field_name: 'constants/field_name'
label:
plugin: default_value
default_value: 'Promoted to front page'
'default_value/0/value': 'options/promote'
destination:
plugin: entity:base_field_override
......
......@@ -11,6 +11,9 @@ process:
entity_type: 'constants/entity_type'
bundle: type
field_name: 'constants/field_name'
label:
plugin: default_value
default_value: 'Sticky at the top of lists'
'default_value/0/value': 'options/sticky'
destination:
plugin: entity:base_field_override
......
<?php
/**
* @file
* Contains \Drupal\node\Tests\Migrate\d6\MigrateNodeSettingPromoteTest.
*/
namespace Drupal\node\Tests\Migrate\d6;
use Drupal\Core\Field\Entity\BaseFieldOverride;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* @group migrate_drupal_6
*/
class MigrateNodeSettingPromoteTest extends MigrateDrupal6TestBase {
public static $modules = ['node', 'text'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['node']);
$this->executeMigration('d6_node_type');
$this->executeMigration('d6_node_setting_promote');
}
/**
* Tests migration of the promote checkbox's settings.
*/
public function testMigration() {
$this->assertIdentical('Promoted to front page', BaseFieldOverride::load('node.article.promote')->label());
}
}
<?php
/**
* @file
* Contains \Drupal\node\Tests\Migrate\d6\MigrateNodeSettingStickyTest.
*/
namespace Drupal\node\Tests\Migrate\d6;
use Drupal\Core\Field\Entity\BaseFieldOverride;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* @group migrate_drupal_6
*/
class MigrateNodeSettingStickyTest extends MigrateDrupal6TestBase {
public static $modules = ['node', 'text'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['node']);
$this->executeMigration('d6_node_type');
$this->executeMigration('d6_node_setting_sticky');
}
/**
* Tests migration of the sticky checkbox's settings.
*/
public function testMigration() {
$this->assertIdentical('Sticky at the top of lists', BaseFieldOverride::load('node.article.sticky')->label());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment