X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FFunctional%2FConfigTranslationListUiTest.php;fp=web%2Fcore%2Fmodules%2Fconfig_translation%2Ftests%2Fsrc%2FFunctional%2FConfigTranslationListUiTest.php;h=1d0116dc99973741160c60a13f45f9d28764d9a4;hp=586d1975799c8906ded84a302834f6f643047c0d;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index 586d19757..1d0116dc9 100644 --- a/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/web/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\config_translation\Functional; use Drupal\block_content\Entity\BlockContentType; -use Drupal\Component\Utility\Unicode; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\language\Entity\ConfigurableLanguage; @@ -80,6 +79,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // tests. $this->config('locale.settings') ->set('translation.import_enabled', TRUE) + ->set('translation.use_source', LOCALE_TRANSLATION_USE_SOURCE_LOCAL) ->save(); $this->drupalPlaceBlock('local_tasks_block'); } @@ -93,7 +93,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { protected function doBlockListTest() { // Add a test block, any block will do. // Set the machine name so the translate link can be built later. - $id = Unicode::strtolower($this->randomMachineName(16)); + $id = mb_strtolower($this->randomMachineName(16)); $this->drupalPlaceBlock('system_powered_by_block', ['id' => $id]); // Get the Block listing. @@ -116,7 +116,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // this does not test more than necessary. $this->drupalGet('admin/structure/menu/add'); // Lowercase the machine name. - $menu_name = Unicode::strtolower($this->randomMachineName(16)); + $menu_name = mb_strtolower($this->randomMachineName(16)); $label = $this->randomMachineName(16); $edit = [ 'id' => $menu_name, @@ -164,7 +164,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => Unicode::strtolower($this->randomMachineName()), + 'vid' => mb_strtolower($this->randomMachineName()), ]); $vocabulary->save(); @@ -187,9 +187,9 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test custom block type to decouple looking for translate // operations link so this does not test more than necessary. $block_content_type = BlockContentType::create([ - 'id' => Unicode::strtolower($this->randomMachineName(16)), + 'id' => mb_strtolower($this->randomMachineName(16)), 'label' => $this->randomMachineName(), - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); @@ -212,7 +212,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test contact form to decouple looking for translate operations // link so this does not test more than necessary. $contact_form = ContactForm::create([ - 'id' => Unicode::strtolower($this->randomMachineName(16)), + 'id' => mb_strtolower($this->randomMachineName(16)), 'label' => $this->randomMachineName(), ]); $contact_form->save(); @@ -236,7 +236,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test content type to decouple looking for translate operations // link so this does not test more than necessary. $content_type = $this->drupalCreateContentType([ - 'type' => Unicode::strtolower($this->randomMachineName(16)), + 'type' => mb_strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), ]); @@ -259,7 +259,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test format to decouple looking for translate operations // link so this does not test more than necessary. $filter_format = FilterFormat::create([ - 'format' => Unicode::strtolower($this->randomMachineName(16)), + 'format' => mb_strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), ]); $filter_format->save(); @@ -283,7 +283,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test shortcut to decouple looking for translate operations // link so this does not test more than necessary. $shortcut = ShortcutSet::create([ - 'id' => Unicode::strtolower($this->randomMachineName(16)), + 'id' => mb_strtolower($this->randomMachineName(16)), 'label' => $this->randomString(), ]); $shortcut->save(); @@ -306,7 +306,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { public function doUserRoleListTest() { // Create a test role to decouple looking for translate operations // link so this does not test more than necessary. - $role_id = Unicode::strtolower($this->randomMachineName(16)); + $role_id = mb_strtolower($this->randomMachineName(16)); $this->drupalCreateRole([], $role_id); // Get the role listing. @@ -387,7 +387,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { public function doFieldListTest() { // Create a base content type. $content_type = $this->drupalCreateContentType([ - 'type' => Unicode::strtolower($this->randomMachineName(16)), + 'type' => mb_strtolower($this->randomMachineName(16)), 'name' => $this->randomMachineName(), ]); @@ -395,7 +395,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { $block_content_type = BlockContentType::create([ 'id' => 'basic', 'label' => 'Basic', - 'revision' => FALSE + 'revision' => FALSE, ]); $block_content_type->save(); $field = FieldConfig::create([