Update to Drupal 8.0.0-rc3. For more information, see https://www.drupal.org/node/2608078
This commit is contained in:
parent
6419a031d7
commit
4afb23bbd3
762 changed files with 20080 additions and 6368 deletions
|
@ -534,7 +534,7 @@ function content_translation_form_language_content_settings_form_alter(array &$f
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_HOOK() for theme_language_content_settings_table().
|
||||
* Implements hook_preprocess_HOOK() for language-content-settings-table.html.twig.
|
||||
*/
|
||||
function content_translation_preprocess_language_content_settings_table(&$variables) {
|
||||
module_load_include('inc', 'content_translation', 'content_translation.admin');
|
||||
|
|
|
@ -27,7 +27,7 @@ class ContentTestTranslationUITest extends ContentTranslationUITestBase {
|
|||
public static $modules = array('language', 'content_translation', 'entity_test');
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\simpletest\WebTestBase::setUp().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
// Use the entity_test_mul as this has multilingual property support.
|
||||
|
@ -36,7 +36,7 @@ class ContentTestTranslationUITest extends ContentTranslationUITestBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\content_translation\Tests\ContentTranslationUITestBase::getTranslatorPermission().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getTranslatorPermissions() {
|
||||
return array_merge(parent::getTranslatorPermissions(), array('administer entity_test content', 'view test entity'));
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\content_translation\Tests\ContentTranslationEnableTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\content_translation\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
||||
/**
|
||||
* Test enabling content translation after other modules.
|
||||
*
|
||||
* @group content_translation
|
||||
*/
|
||||
class ContentTranslationEnableTest extends WebTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['entity_test', 'menu_link_content'];
|
||||
|
||||
/**
|
||||
* Tests that entity schemas are up-to-date after enabling translation.
|
||||
*/
|
||||
public function testEnable() {
|
||||
$this->drupalLogin($this->rootUser);
|
||||
// Enable modules and make sure the related config entity type definitions
|
||||
// are installed.
|
||||
$edit = [
|
||||
'modules[Multilingual][content_translation][enable]' => TRUE,
|
||||
'modules[Multilingual][language][enable]' => TRUE,
|
||||
];
|
||||
$this->drupalPostForm('admin/modules', $edit, t('Install'));
|
||||
|
||||
// No pending updates should be available.
|
||||
$this->drupalGet('admin/reports/status');
|
||||
$requirement_value = $this->cssSelect("tr.system-status-report__entry th:contains('Entity/field definitions') + td");
|
||||
$this->assertEqual(t('Up to date'), trim((string) $requirement_value[0]));
|
||||
|
||||
// Enable content translation on entity types that have will have a
|
||||
// content_translation_uid.
|
||||
$edit = [
|
||||
'entity_types[menu_link_content]' => TRUE,
|
||||
'settings[menu_link_content][menu_link_content][translatable]' => TRUE,
|
||||
'entity_types[entity_test_mul]' => TRUE,
|
||||
'settings[entity_test_mul][entity_test_mul][translatable]' => TRUE,
|
||||
];
|
||||
$this->drupalPostForm('admin/config/regional/content-language', $edit, t('Save configuration'));
|
||||
|
||||
// No pending updates should be available.
|
||||
$this->drupalGet('admin/reports/status');
|
||||
$requirement_value = $this->cssSelect("tr.system-status-report__entry th:contains('Entity/field definitions') + td");
|
||||
$this->assertEqual(t('Up to date'), trim((string) $requirement_value[0]));
|
||||
}
|
||||
|
||||
}
|
|
@ -49,7 +49,7 @@ class ContentTranslationWorkflowsTest extends ContentTranslationTestBase {
|
|||
}
|
||||
|
||||
/**
|
||||
* Overrides \Drupal\content_translation\Tests\ContentTranslationTestBase::getEditorPermissions().
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getEditorPermissions() {
|
||||
return array('administer entity_test content');
|
||||
|
|
Reference in a new issue