Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / field_ui / src / Tests / ManageDisplayTest.php
index 688b9e9e8471d42b1a20fe95d37068e0026df61d..4975299947c973ecdb33906a7666f8eca0481e9c 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace Drupal\field_ui\Tests;
 
-use Drupal\Component\Utility\Unicode;
 use Drupal\Core\Entity\Entity\EntityFormDisplay;
 use Drupal\Core\Entity\Entity\EntityViewDisplay;
 use Drupal\Core\Entity\EntityInterface;
@@ -48,7 +47,7 @@ class ManageDisplayTest extends WebTestBase {
     $vocabulary = Vocabulary::create([
       'name' => $this->randomMachineName(),
       'description' => $this->randomMachineName(),
-      'vid' => Unicode::strtolower($this->randomMachineName()),
+      'vid' => mb_strtolower($this->randomMachineName()),
       'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
       'help' => '',
       'nodes' => ['article' => 'article'],
@@ -119,7 +118,7 @@ class ManageDisplayTest extends WebTestBase {
     $edit = [
       'fields[field_test][type]' => 'field_test_multiple',
       'fields[field_test][region]' => 'content',
-      'refresh_rows' => 'field_test'
+      'refresh_rows' => 'field_test',
     ];
     $this->drupalPostAjaxForm(NULL, $edit, ['op' => t('Refresh')]);
     $format = 'field_test_multiple';
@@ -252,6 +251,7 @@ class ManageDisplayTest extends WebTestBase {
     }, $result);
     $expected_options = [
       'test_field_widget',
+      'test_field_widget_multilingual',
       'test_field_widget_multiple',
     ];
     $this->assertEqual($options, $expected_options, 'The expected widget ordering is respected.');
@@ -313,8 +313,8 @@ class ManageDisplayTest extends WebTestBase {
     $this->drupalGet($manage_display);
 
     // Checks if the select elements contain the specified options.
-    $this->assertFieldSelectOptions('fields[field_test][type]', ['test_field_widget', 'test_field_widget_multiple']);
-    $this->assertFieldSelectOptions('fields[field_onewidgetfield][type]', ['test_field_widget']);
+    $this->assertFieldSelectOptions('fields[field_test][type]', ['test_field_widget', 'test_field_widget_multilingual', 'test_field_widget_multiple']);
+    $this->assertFieldSelectOptions('fields[field_onewidgetfield][type]', ['test_field_widget', 'test_field_widget_multilingual']);
 
     // Ensure that fields can be hidden directly by changing the region.
     $this->assertFieldByName('fields[field_test][region]', 'content');
@@ -487,7 +487,7 @@ class ManageDisplayTest extends WebTestBase {
   }
 
   /**
-   * Asserts that a string is (not) found in the rendered nodein a view mode.
+   * Asserts that a string is (not) found in the rendered node in a view mode.
    *
    * This helper function is used by assertNodeViewText() and
    * assertNodeViewNoText().