Update to Drupal 8.1.5. For more information, see https://www.drupal.org/project/drupal/releases/8.1.5

This commit is contained in:
Pantheon Automation 2016-07-07 09:44:38 -07:00 committed by Greg Anderson
parent 13b6ca7cc2
commit 38ba7c357d
342 changed files with 7814 additions and 1534 deletions

View file

@ -0,0 +1,59 @@
<?php
namespace Drupal\Tests\language\Kernel\Migrate\d6;
use Drupal\language\Entity\ContentLanguageSettings;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
/**
* Tests migration of language content setting variables,
* language_content_type_$type, i18n_node_options_* and i18n_lock_node_*.
*
* @group migrate_drupal_6
*/
class MigrateLanguageContentSettingsTest extends MigrateDrupal6TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['node', 'text', 'language', 'content_translation'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['node']);
$this->executeMigrations(['d6_node_type', 'd6_language_content_settings']);
}
/**
* Tests migration of content language settings.
*/
public function testLanguageContent() {
// Assert that a translatable content is still translatable.
$config = $this->config('language.content_settings.node.article');
$this->assertSame($config->get('target_entity_type_id'), 'node');
$this->assertSame($config->get('target_bundle'), 'article');
$this->assertSame($config->get('default_langcode'), 'current_interface');
$this->assertTrue($config->get('third_party_settings.content_translation.enabled'));
// Assert that a non-translatable content is not translatable.
$config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'company');
$this->assertTrue($config->isDefaultConfiguration());
$this->assertFalse($config->isLanguageAlterable());
$this->assertSame($config->getDefaultLangcode(), 'site_default');
}
/**
* Tests migration of content language settings when there is no language lock.
*/
public function testLanguageContentWithNoLanguageLock() {
// Assert that a we can assign a language.
$config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'employee');
$this->assertSame($config->getDefaultLangcode(), 'current_interface');
$this->assertTrue($config->isLanguageAlterable());
}
}

View file

@ -0,0 +1,50 @@
<?php
namespace Drupal\Tests\language\Kernel\Migrate\d7;
use Drupal\language\Entity\ContentLanguageSettings;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Tests migration of language content setting variables,
* language_content_type_$type, i18n_node_options_* and i18n_lock_node_*.
*
* @group migrate_drupal_7
*/
class MigrateLanguageContentSettingsTest extends MigrateDrupal7TestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['node', 'text', 'language', 'content_translation'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->installConfig(['node']);
$this->executeMigrations(['d7_node_type', 'd7_language_content_settings']);
}
/**
* Tests migration of content language settings.
*/
public function testLanguageContent() {
// Assert that a translatable content is still translatable.
$config = $this->config('language.content_settings.node.blog');
$this->assertIdentical($config->get('target_entity_type_id'), 'node');
$this->assertIdentical($config->get('target_bundle'), 'blog');
$this->assertIdentical($config->get('default_langcode'), 'current_interface');
$this->assertFalse($config->get('language_alterable'));
$this->assertTrue($config->get('third_party_settings.content_translation.enabled'));
// Assert that a non-translatable content is not translatable.
$config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'page');
$this->assertTrue($config->isDefaultConfiguration());
$this->assertFalse($config->isLanguageAlterable());
$this->assertSame($config->getDefaultLangcode(), 'site_default');
}
}