summaryrefslogtreecommitdiffstats
path: root/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php')
-rw-r--r--core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
index 434384f..3ba3fe6 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeTypeInitialLanguageTest.php
@@ -17,7 +17,7 @@ class NodeTypeInitialLanguageTest extends NodeTestBase {
*
* @var array
*/
- public static $modules = array('language');
+ public static $modules = array('language', 'field_ui');
public static function getInfo() {
return array(
@@ -45,6 +45,11 @@ class NodeTypeInitialLanguageTest extends NodeTestBase {
$this->assertOptionSelected('edit-node-type-language-default', 'site_default', 'The default inital language is the site default.');
$this->assertFieldChecked('edit-node-type-language-hidden', 'Language selector is hidden by default.');
+ // Tests if the language field cannot be rearranged on the manage fields tab.
+ $this->drupalGet('admin/structure/types/manage/article/fields');
+ $language_field = $this->xpath('//*[@id="field-overview"]/*[@id="language"]');
+ $this->assert(empty($language_field), 'Language field is not visible on manage fields tab.');
+
$this->drupalGet('node/add/article');
$this->assertNoField('langcode', 'Language is not selectable on node add/edit page by default.');
@@ -68,6 +73,11 @@ class NodeTypeInitialLanguageTest extends NodeTestBase {
$this->assertField('langcode', 'Language is selectable on node add/edit page when language not hidden.');
$this->assertOptionSelected('edit-langcode', 'hu', 'The inital language is the site default on the node add page after the site default language is changed.');
+ // Tests if the language field can be rearranged on the manage fields tab.
+ $this->drupalGet('admin/structure/types/manage/article/fields');
+ $language_field = $this->xpath('//*[@id="language"]');
+ $this->assert(!empty($language_field), 'Language field is visible on manage fields tab.');
+
// Changes the inital language settings.
$edit = array(
'node_type_language_default' => 'en',