diff --git a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php index cb4030792272d346b1dc0fa436353f1c7565bb05..925544415d5fa7013d404246c99eb3bcac4eee68 100644 --- a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php +++ b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php @@ -44,7 +44,7 @@ protected function setUp(): void { public function testBlockOperationAlter() { // Add a test block, any block will do. // Set the machine name so the test_operation link can be built later. - $block_id = mb_strtolower($this->randomMachineName(16)); + $block_id = $this->randomMachineName(16); $this->drupalPlaceBlock('system_powered_by_block', ['id' => $block_id]); // Get the Block listing. diff --git a/core/modules/block/tests/src/Functional/BlockLanguageTest.php b/core/modules/block/tests/src/Functional/BlockLanguageTest.php index 95c2b3fa4df0c0da93429398b17d16d12383a5e0..cd558073852bcbb42d1913bd8a95130c18aca81f 100644 --- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php +++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php @@ -79,7 +79,7 @@ public function testLanguageBlockVisibility() { // Enable a standard block and set the visibility setting for one language. $edit = [ 'visibility[language][langcodes][en]' => TRUE, - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'region' => 'sidebar_first', ]; $this->drupalGet('admin/structure/block/add/system_powered_by_block' . '/' . $default_theme); @@ -165,7 +165,7 @@ public function testMultipleLanguageTypes() { $this->assertSession()->fieldExists('visibility[language][context_mapping][language]'); // Enable a standard block and set visibility to French only. - $block_id = strtolower($this->randomMachineName(8)); + $block_id = $this->randomMachineName(8); $edit = [ 'visibility[language][context_mapping][language]' => '@language.current_language_context:language_interface', 'visibility[language][langcodes][fr]' => TRUE, diff --git a/core/modules/block/tests/src/Functional/BlockTest.php b/core/modules/block/tests/src/Functional/BlockTest.php index 4fc188a85e3a2e43d69e2750fde0b78ca9665abc..e626f7e7f9fa9c2a7d105ee98bb7281f8f6ad769 100644 --- a/core/modules/block/tests/src/Functional/BlockTest.php +++ b/core/modules/block/tests/src/Functional/BlockTest.php @@ -30,7 +30,7 @@ public function testBlockVisibility() { // Enable a standard block. $default_theme = $this->config('system.theme')->get('default'); $edit = [ - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'region' => 'sidebar_first', 'settings[label]' => $title, 'settings[label_display]' => TRUE, @@ -90,7 +90,7 @@ public function testBlockToggleVisibility() { // Enable a standard block. $default_theme = $this->config('system.theme')->get('default'); $edit = [ - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'region' => 'sidebar_first', 'settings[label]' => $title, ]; @@ -127,7 +127,7 @@ public function testBlockVisibilityListedEmpty() { // Enable a standard block. $default_theme = $this->config('system.theme')->get('default'); $edit = [ - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'region' => 'sidebar_first', 'settings[label]' => $title, 'visibility[request_path][negate]' => TRUE, @@ -187,7 +187,7 @@ public function testAddBlockFromLibraryWithWeight() { // Create a random title for the block. $title = $this->randomMachineName(8); - $block_id = strtolower($this->randomMachineName(8)); + $block_id = $this->randomMachineName(8); $edit = [ 'id' => $block_id, 'settings[label]' => $title, @@ -304,7 +304,7 @@ public function testBlockThemeSelector() { $this->assertSession()->titleEquals('Block layout | Drupal'); // Select the 'Powered by Drupal' block to be placed. $block = []; - $block['id'] = strtolower($this->randomMachineName()); + $block['id'] = $this->randomMachineName(); $block['theme'] = $theme; $block['region'] = 'content'; $this->drupalGet('admin/structure/block/add/system_powered_by_block'); @@ -343,7 +343,7 @@ public function testHideBlockTitle() { $block_name = 'system_powered_by_block'; // Create a random title for the block. $title = $this->randomMachineName(8); - $id = strtolower($this->randomMachineName(8)); + $id = $this->randomMachineName(8); // Enable a standard block. $default_theme = $this->config('system.theme')->get('default'); $edit = [ diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php index 882fadb9b039c05d494e925e2ce4fcc603c680a8..28a4c476db9b01e87bd16eb4257fb084023a41e2 100644 --- a/core/modules/block/tests/src/Functional/BlockUiTest.php +++ b/core/modules/block/tests/src/Functional/BlockUiTest.php @@ -317,7 +317,7 @@ public function testBlockPlacementIndicator() { // Select the 'Powered by Drupal' block to be placed. $block = []; - $block['id'] = strtolower($this->randomMachineName()); + $block['id'] = $this->randomMachineName(); $block['theme'] = 'stark'; $block['region'] = 'content'; diff --git a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php index 55f54f822d49b9927dab35affc9e24ac60fe7f44..043474f0725209c6d3117d994598dff245e758a3 100644 --- a/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php +++ b/core/modules/block/tests/src/Functional/Views/DisplayBlockTest.php @@ -70,7 +70,7 @@ public function testBlockCategory() { // Create a new view in the UI. $edit = []; $edit['label'] = $this->randomString(); - $edit['id'] = strtolower($this->randomMachineName()); + $edit['id'] = $this->randomMachineName(); $edit['show[wizard_key]'] = 'standard:views_test_data'; $edit['description'] = $this->randomString(); $edit['block[create]'] = TRUE; diff --git a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php index 1f576125af39e1b8386f22bf0df1f49af2b673e6..7b61ab6f7077735bf24dc292f4d14321bff51d72 100644 --- a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php +++ b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php @@ -65,7 +65,7 @@ protected function setUp(): void { */ public function testBlockConfigSchema() { foreach ($this->blockManager->getDefinitions() as $block_id => $definition) { - $id = strtolower($this->randomMachineName()); + $id = $this->randomMachineName(); $block = Block::create([ 'id' => $id, 'theme' => 'stark', diff --git a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php index b2f099a49cad46f81e623803cb45de5d92a0bc2c..06bf3544e4dbbe7fe72a8d53684520431a48a857 100644 --- a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php +++ b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php @@ -35,15 +35,15 @@ public function testNewDefaultThemeBlocks() { // Add two instances of the user login block. $this->placeBlock('user_login_block', [ - 'id' => $default_theme . '_' . strtolower($this->randomMachineName(8)), + 'id' => $default_theme . '_' . $this->randomMachineName(8), ]); $this->placeBlock('user_login_block', [ - 'id' => $default_theme . '_' . strtolower($this->randomMachineName(8)), + 'id' => $default_theme . '_' . $this->randomMachineName(8), ]); // Add an instance of a different block. $this->placeBlock('system_powered_by_block', [ - 'id' => $default_theme . '_' . strtolower($this->randomMachineName(8)), + 'id' => $default_theme . '_' . $this->randomMachineName(8), ]); // Install a different theme that does not have blocks. diff --git a/core/modules/block/tests/src/Traits/BlockCreationTrait.php b/core/modules/block/tests/src/Traits/BlockCreationTrait.php index fe1bc3c92211c7d9b5835529553a3c1250c0eefb..440f34c10da8069afe2146fbcb4b398fc2b97feb 100644 --- a/core/modules/block/tests/src/Traits/BlockCreationTrait.php +++ b/core/modules/block/tests/src/Traits/BlockCreationTrait.php @@ -43,7 +43,7 @@ protected function placeBlock($plugin_id, array $settings = []) { $settings += [ 'plugin' => $plugin_id, 'region' => 'content', - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'theme' => $config->get('system.theme')->get('default'), 'label' => $this->randomMachineName(8), 'visibility' => [], diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php index c719e4a378212dac188b9d4aaa19dc036de6b364..17e5a223472e0e6896bf291716fe3e74572a03ce 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTestBase.php @@ -108,7 +108,7 @@ protected function createBlockContentType($values, $create_body = FALSE) { if (is_array($values)) { if (!isset($values['id'])) { do { - $id = strtolower($this->randomMachineName(8)); + $id = $this->randomMachineName(8); } while (BlockContentType::load($id)); } else { diff --git a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php index ae69ff101519b59fda1348733544784c50dadec6..98d302dbc14b36f7fbf4c166cbcfb9d8762e9d04 100644 --- a/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php +++ b/core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php @@ -88,7 +88,7 @@ public function getTranslatorPermissions() { * {@inheritdoc} */ protected function getNewEntityValues($langcode) { - return ['info' => mb_strtolower($this->randomMachineName())] + parent::getNewEntityValues($langcode); + return ['info' => $this->randomMachineName()] + parent::getNewEntityValues($langcode); } /** diff --git a/core/modules/block_content/tests/src/Functional/PageEditTest.php b/core/modules/block_content/tests/src/Functional/PageEditTest.php index f2ae75d02c196e2328f8441b81b917b93d667297..b45452b03dcf039c48ca1eb822b13c094b0191b6 100644 --- a/core/modules/block_content/tests/src/Functional/PageEditTest.php +++ b/core/modules/block_content/tests/src/Functional/PageEditTest.php @@ -39,7 +39,7 @@ public function testPageEdit() { $body_key = 'body[0][value]'; // Create block to edit. $edit = []; - $edit['info[0][value]'] = mb_strtolower($this->randomMachineName(8)); + $edit['info[0][value]'] = $this->randomMachineName(8); $edit[$body_key] = $this->randomMachineName(16); $this->drupalGet('block/add/basic'); $this->submitForm($edit, 'Save'); diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php index b9222d93bb55b7a043afe8746ac8b5e587bb328e..3482f7923c9af9b8f538754a8b0341c1769e3de1 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentTestBase.php @@ -88,7 +88,7 @@ protected function createBlockContentType(array $values = []) { // Find a non-existent random type name. if (!isset($values['id'])) { do { - $id = strtolower($this->randomMachineName(8)); + $id = $this->randomMachineName(8); } while (BlockContentType::load($id)); } else { diff --git a/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php b/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php index e68923b342375a68412e87280d24882a9f3fd422..de68b2aeb291ebf73ac616d3a4005f57c63982e6 100644 --- a/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php +++ b/core/modules/block_content/tests/src/Functional/Views/BlockContentWizardTest.php @@ -35,7 +35,7 @@ protected function setUp(): void { public function testViewAddBlockContent() { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = FALSE; $view['show[wizard_key]'] = 'block_content'; diff --git a/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php index a68452a13bfc0079161552cd44648ede60959f11..ec5e319168ddf94d8729141066ad4f19b4940ff8 100644 --- a/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +++ b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php @@ -309,7 +309,7 @@ public function testViewMode() { $this->assertSession()->responseContains('<p>' . $comment_text . '</p>'); // Create a new comment entity view mode. - $mode = mb_strtolower($this->randomMachineName()); + $mode = $this->randomMachineName(); EntityViewMode::create([ 'targetEntityType' => 'comment', 'id' => "comment.$mode", diff --git a/core/modules/comment/tests/src/Functional/Views/WizardTest.php b/core/modules/comment/tests/src/Functional/Views/WizardTest.php index c8b206134503011191596224ce10633c7cebcb72..5252f833050aabd66d3954223977b4b02702061e 100644 --- a/core/modules/comment/tests/src/Functional/Views/WizardTest.php +++ b/core/modules/comment/tests/src/Functional/Views/WizardTest.php @@ -44,7 +44,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void { public function testCommentWizard() { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['show[wizard_key]'] = 'comment'; $view['page[create]'] = TRUE; $view['page[path]'] = $this->randomMachineName(16); @@ -73,7 +73,7 @@ public function testCommentWizard() { } $this->assertEquals($expected_options, $actual_options); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $this->submitForm($view, 'Save and edit'); // Verify that the view saving was successful and the browser got redirected // to the edit page. diff --git a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php index c098c0ccf35fc1fb80c25a195ddcaf8ce94a50c3..9e48bcd1e53bd8e4768cb16d356581c8c7b74757 100644 --- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php @@ -58,7 +58,7 @@ protected function setUp(): void { * @see CommentDefaultFormatter::calculateDependencies() */ public function testViewMode() { - $mode = mb_strtolower($this->randomMachineName()); + $mode = $this->randomMachineName(); // Create a new comment view mode and a view display entity. EntityViewMode::create([ 'id' => "comment.$mode", @@ -75,7 +75,7 @@ public function testViewMode() { FieldStorageConfig::create([ 'entity_type' => 'entity_test', 'type' => 'comment', - 'field_name' => $field_name = mb_strtolower($this->randomMachineName()), + 'field_name' => $field_name = $this->randomMachineName(), 'settings' => [ 'comment_type' => 'comment', ], diff --git a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php index e58aaa9a984d510067e9075bd2a7a75631894920..b2bb975cce84eefbfb570575d73d6fe48fa71608 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php @@ -31,7 +31,7 @@ public function testCRUD() { 'administer site configuration', ])); - $id = strtolower($this->randomMachineName()); + $id = $this->randomMachineName(); $edit = [ 'id' => $id, 'label' => $this->randomMachineName(), diff --git a/core/modules/config/tests/src/Functional/ConfigEntityTest.php b/core/modules/config/tests/src/Functional/ConfigEntityTest.php index f2aff9521bb087fe48f660911ee847992c999790..7f7c5e534f2a543e6b08a7ab72e9a2845402a04e 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php @@ -230,7 +230,7 @@ public function testCrudUi() { 'administer site configuration', ])); - $id = strtolower($this->randomMachineName()); + $id = $this->randomMachineName(); $label1 = $this->randomMachineName(); $label2 = $this->randomMachineName(); $label3 = $this->randomMachineName(); @@ -290,7 +290,7 @@ public function testCrudUi() { // Rename the configuration entity's ID/machine name. $edit = [ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $label3, ]; $this->drupalGet("admin/structure/config_test/manage/{$id}"); @@ -326,7 +326,7 @@ public function testCrudUi() { // @see \Drupal\Tests\config\FunctionalJavascript\ConfigEntityTest::testAjaxOnAddPage() $this->drupalGet('admin/structure/config_test/add'); - $id = strtolower($this->randomMachineName()); + $id = $this->randomMachineName(); $edit = [ 'id' => $id, 'label' => $this->randomString(), diff --git a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php index fa01655f679e658ce9aa17538a7e192d22472861..ee7ba633b644df89bebb06fbffd57406097c7595 100644 --- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php @@ -106,7 +106,7 @@ public function testExportImport() { $this->contentType = $this->drupalCreateContentType(); // Create a field. - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php index 182b365955942a2598a11f9b8958dea0ad1d07b7..440fa2f7f503a002b0002e6cacd32034e7f6d128 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationCacheTest.php @@ -122,7 +122,7 @@ protected function setUp(): void { public function testFieldConfigTranslation() { // Add a test field which has a translatable field setting and a // translatable field storage setting. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -133,7 +133,7 @@ public function testFieldConfigTranslation() { $field_storage->setSetting('translatable_storage_setting', $translatable_storage_setting); $field_storage->save(); - $bundle = strtolower($this->randomMachineName()); + $bundle = $this->randomMachineName(); entity_test_create_bundle($bundle); $field = FieldConfig::create([ 'field_name' => $field_name, diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php index 657ba9486e51ad826fe707fc80fefcefbc006781..f7d921ff4af902d4657cb7e0e6758345eed47d48 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php @@ -104,7 +104,7 @@ protected function setUp(): void { protected function doBlockListTest() { // Add a test block, any block will do. // Set the machine name so the translate link can be built later. - $id = mb_strtolower($this->randomMachineName(16)); + $id = $this->randomMachineName(16); $this->drupalPlaceBlock('system_powered_by_block', ['id' => $id]); // Get the Block listing. @@ -127,7 +127,7 @@ protected function doMenuListTest() { // this does not test more than necessary. $this->drupalGet('admin/structure/menu/add'); // Lowercase the machine name. - $menu_name = mb_strtolower($this->randomMachineName(16)); + $menu_name = $this->randomMachineName(16); $label = $this->randomMachineName(16); $edit = [ 'id' => $menu_name, @@ -176,7 +176,7 @@ protected function doVocabularyListTest() { $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), ]); $vocabulary->save(); @@ -199,7 +199,7 @@ public function doCustomContentTypeListTest() { // Create a test block type to decouple looking for translate // operations link so this does not test more than necessary. $block_content_type = BlockContentType::create([ - 'id' => mb_strtolower($this->randomMachineName(16)), + 'id' => $this->randomMachineName(16), 'label' => $this->randomMachineName(), 'revision' => FALSE, ]); @@ -224,7 +224,7 @@ public function doContactFormsListTest() { // 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' => mb_strtolower($this->randomMachineName(16)), + 'id' => $this->randomMachineName(16), 'label' => $this->randomMachineName(), ]); $contact_form->save(); @@ -248,7 +248,7 @@ public function doContentTypeListTest() { // 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' => mb_strtolower($this->randomMachineName(16)), + 'type' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), ]); @@ -271,7 +271,7 @@ public function doFormatsListTest() { // Create a test format to decouple looking for translate operations // link so this does not test more than necessary. $filter_format = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName(16)), + 'format' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), ]); $filter_format->save(); @@ -295,7 +295,7 @@ public function doShortcutListTest() { // Create a test shortcut to decouple looking for translate operations // link so this does not test more than necessary. $shortcut = ShortcutSet::create([ - 'id' => mb_strtolower($this->randomMachineName(16)), + 'id' => $this->randomMachineName(16), 'label' => $this->randomString(), ]); $shortcut->save(); @@ -318,7 +318,7 @@ public function doShortcutListTest() { public function doUserRoleListTest() { // Create a test role to decouple looking for translate operations // link so this does not test more than necessary. - $role_id = mb_strtolower($this->randomMachineName(16)); + $role_id = $this->randomMachineName(16); $this->drupalCreateRole([], $role_id); // Get the role listing. @@ -400,7 +400,7 @@ public function doResponsiveImageListTest() { public function doFieldListTest() { // Create a base content type. $content_type = $this->drupalCreateContentType([ - 'type' => mb_strtolower($this->randomMachineName(16)), + 'type' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), ]); diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index 0371c396853dbd651ac5abeac8e8e5af1dcc6757..688009de5bbe1cc978080497412e6f0f888266ad 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -746,7 +746,7 @@ public function testPluralConfigStrings() { public function testFieldConfigTranslation() { // Add a test field which has a translatable field setting and a // translatable field storage setting. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -757,7 +757,7 @@ public function testFieldConfigTranslation() { $field_storage->setSetting('translatable_storage_setting', $translatable_storage_setting); $field_storage->save(); - $bundle = strtolower($this->randomMachineName()); + $bundle = $this->randomMachineName(); entity_test_create_bundle($bundle); $field = FieldConfig::create([ 'field_name' => $field_name, @@ -785,14 +785,14 @@ public function testFieldConfigTranslation() { */ public function testBooleanFieldConfigTranslation() { // Add a test boolean field. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', 'type' => 'boolean', ])->save(); - $bundle = strtolower($this->randomMachineName()); + $bundle = $this->randomMachineName(); entity_test_create_bundle($bundle); $field = FieldConfig::create([ 'field_name' => $field_name, diff --git a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php index 8035f6ac4415fb31488cbb254bd9075f58084311..7f8b1090dc079687948b3de2c55d76c6ab3b702e 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -163,16 +163,16 @@ public function testSiteWideContact() { $recipients = ['simpletest&@example.com', 'simpletest2@example.com', 'simpletest3@example.com']; $max_length = EntityTypeInterface::BUNDLE_MAX_LENGTH; $max_length_exceeded = $max_length + 1; - $this->addContactForm($id = mb_strtolower($this->randomMachineName($max_length_exceeded)), $label = $this->randomMachineName($max_length_exceeded), implode(',', [$recipients[0]]), '', TRUE); + $this->addContactForm($id = $this->randomMachineName($max_length_exceeded), $label = $this->randomMachineName($max_length_exceeded), implode(',', [$recipients[0]]), '', TRUE); $this->assertSession()->pageTextContains('Machine-readable name cannot be longer than ' . $max_length . ' characters but is currently ' . $max_length_exceeded . ' characters long.'); - $this->addContactForm($id = mb_strtolower($this->randomMachineName($max_length)), $label = $this->randomMachineName($max_length), implode(',', [$recipients[0]]), '', TRUE); + $this->addContactForm($id = $this->randomMachineName($max_length), $label = $this->randomMachineName($max_length), implode(',', [$recipients[0]]), '', TRUE); $this->assertSession()->pageTextContains('Contact form ' . $label . ' has been added.'); // Verify that the creation message contains a link to a contact form. $this->assertSession()->elementExists('xpath', '//div[@data-drupal-messages]//a[contains(@href, "contact/")]'); // Create first valid form. - $this->addContactForm($id = mb_strtolower($this->randomMachineName(16)), $label = $this->randomMachineName(16), implode(',', [$recipients[0]]), '', TRUE); + $this->addContactForm($id = $this->randomMachineName(16), $label = $this->randomMachineName(16), implode(',', [$recipients[0]]), '', TRUE); $this->assertSession()->pageTextContains('Contact form ' . $label . ' has been added.'); // Verify that the creation message contains a link to a contact form. @@ -214,10 +214,10 @@ public function testSiteWideContact() { $this->drupalLogin($admin_user); // Add more forms. - $this->addContactForm(mb_strtolower($this->randomMachineName(16)), $label = $this->randomMachineName(16), implode(',', [$recipients[0], $recipients[1]]), '', FALSE); + $this->addContactForm($this->randomMachineName(16), $label = $this->randomMachineName(16), implode(',', [$recipients[0], $recipients[1]]), '', FALSE); $this->assertSession()->pageTextContains('Contact form ' . $label . ' has been added.'); - $this->addContactForm($name = mb_strtolower($this->randomMachineName(16)), $label = $this->randomMachineName(16), implode(',', [$recipients[0], $recipients[1], $recipients[2]]), '', FALSE); + $this->addContactForm($name = $this->randomMachineName(16), $label = $this->randomMachineName(16), implode(',', [$recipients[0], $recipients[1], $recipients[2]]), '', FALSE); $this->assertSession()->pageTextContains('Contact form ' . $label . ' has been added.'); // Try adding a form that already exists. @@ -282,7 +282,7 @@ public function testSiteWideContact() { $label = $this->randomMachineName(16); $recipients = implode(',', [$recipients[0], $recipients[1], $recipients[2]]); - $contact_form = mb_strtolower($this->randomMachineName(16)); + $contact_form = $this->randomMachineName(16); $this->addContactForm($contact_form, $label, $recipients, '', FALSE); $this->drupalGet('admin/structure/contact'); $this->clickLink('Edit'); @@ -314,7 +314,7 @@ public function testSiteWideContact() { $this->assertSession()->statusCodeEquals(200); // Create a simple textfield. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_label = $this->randomMachineName(); $this->fieldUIAddNewField(NULL, $field_name, $field_label, 'text'); $field_name = 'field_' . $field_name; diff --git a/core/modules/contact/tests/src/Functional/ContactStorageTest.php b/core/modules/contact/tests/src/Functional/ContactStorageTest.php index b84297ece50ca02383d73b78261df9bdbfadbf29..a0937614cdaee3c89167f8065cdfd63f369c5b7f 100644 --- a/core/modules/contact/tests/src/Functional/ContactStorageTest.php +++ b/core/modules/contact/tests/src/Functional/ContactStorageTest.php @@ -51,7 +51,7 @@ public function testContactStorage() { $this->drupalLogin($admin_user); // Create first valid contact form. $mail = 'simpletest@example.com'; - $this->addContactForm($id = mb_strtolower($this->randomMachineName(16)), $label = $this->randomMachineName(16), implode(',', [$mail]), '', TRUE, 'Your message has been sent.', [ + $this->addContactForm($id = $this->randomMachineName(16), $label = $this->randomMachineName(16), implode(',', [$mail]), '', TRUE, 'Your message has been sent.', [ 'send_a_pony' => 1, ]); $this->assertSession()->pageTextContains('Contact form ' . $label . ' has been added.'); diff --git a/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php b/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php index ae83c46e87ad45b9e8c8e0871ba164167440ff0a..5865c2eaa3911a357bb9146253e28344e02ed947 100644 --- a/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php +++ b/core/modules/contact/tests/src/Kernel/Views/ContactFieldsTest.php @@ -34,7 +34,7 @@ public function testViewsData() { FieldStorageConfig::create([ 'type' => 'text', 'entity_type' => 'contact_message', - 'field_name' => $field_name = strtolower($this->randomMachineName()), + 'field_name' => $field_name = $this->randomMachineName(), ])->save(); ContactForm::create([ diff --git a/core/modules/datetime/tests/src/Functional/DateTestBase.php b/core/modules/datetime/tests/src/Functional/DateTestBase.php index 57cc4cb641e1618ea0b954dc85eca3c0ccc64a5f..ba935418fa703ba50309169791b9a949c7b01522 100644 --- a/core/modules/datetime/tests/src/Functional/DateTestBase.php +++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php @@ -114,8 +114,8 @@ protected function setUp(): void { * Creates a date test field. */ protected function createField() { - $field_name = mb_strtolower($this->randomMachineName()); - $field_label = Unicode::ucfirst(mb_strtolower($this->randomMachineName())); + $field_name = $this->randomMachineName(); + $field_label = Unicode::ucfirst($this->randomMachineName()); $type = $this->getTestFieldType(); $widget_type = $formatter_type = $type . '_default'; diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php index 797cdc6803fd8758a625ecec5b741362d9ce3e67..67d8c328da62cc2d353484cdf79c4657664febfa 100644 --- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -688,7 +688,7 @@ public function testDefaultValue() { $this->drupalCreateContentType(['type' => 'date_content']); // Create a field storage with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', @@ -905,7 +905,7 @@ public function testDateStorageSettings() { $this->drupalCreateContentType(['type' => 'date_content']); // Create a field storage with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php index 7d477be4fce4ec1132583f61554a02d2c1e24dcd..f19d18fd1b1e543503308ddf2b16f409b2370da9 100644 --- a/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php +++ b/core/modules/datetime_range/tests/src/Functional/DateRangeFieldTest.php @@ -1000,7 +1000,7 @@ public function testDefaultValue() { $this->drupalCreateContentType(['type' => 'date_content']); // Create a field storage with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', @@ -1391,7 +1391,7 @@ public function testDateStorageSettings() { $this->drupalCreateContentType(['type' => 'date_content']); // Create a field storage with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php index 9620f5cf8dcee77cf30c73c262c664cca7a5cba1..ef8e75fb4663e87cc88d8fdb7c8b0fc06cd7e6cf 100644 --- a/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php +++ b/core/modules/datetime_range/tests/src/Kernel/DateRangeItemTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { // Add a datetime range field. $this->fieldStorage = FieldStorageConfig::create([ - 'field_name' => mb_strtolower($this->randomMachineName()), + 'field_name' => $this->randomMachineName(), 'entity_type' => 'entity_test', 'type' => 'daterange', 'settings' => ['datetime_type' => DateRangeItem::DATETIME_TYPE_DATE], diff --git a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php index 74e4fc6301ba8e5190739f7ba92fca654f432544..beb7a5540b1185925c4f1f83e28b20ecd42947e5 100644 --- a/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php +++ b/core/modules/datetime_range/tests/src/Kernel/SeparatorTranslationTest.php @@ -57,7 +57,7 @@ protected function setUp(): void { // Add a datetime range field. $this->fieldStorage = FieldStorageConfig::create([ - 'field_name' => mb_strtolower($this->randomMachineName()), + 'field_name' => $this->randomMachineName(), 'entity_type' => 'entity_test', 'type' => 'daterange', 'settings' => ['datetime_type' => DateTimeItem::DATETIME_TYPE_DATE], diff --git a/core/modules/editor/tests/src/Functional/EditorAdminTest.php b/core/modules/editor/tests/src/Functional/EditorAdminTest.php index 4323d50139abc227c092f9ef5aea88c76f5eb99f..985bc4a9be8131be1469657c042bf45087c48220 100644 --- a/core/modules/editor/tests/src/Functional/EditorAdminTest.php +++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php @@ -116,7 +116,7 @@ public function testDisableFormatWithEditor() { $this->container->get('module_installer')->install(['node']); $this->resetAll(); // Create a new node type and attach the 'body' field to it. - $node_type = NodeType::create(['type' => mb_strtolower($this->randomMachineName()), 'name' => $this->randomString()]); + $node_type = NodeType::create(['type' => $this->randomMachineName(), 'name' => $this->randomString()]); $node_type->save(); node_add_body_field($node_type, $this->randomString()); diff --git a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php index 66c238e73ea1abe1f2d98a61cc4f5b45d555ea0f..8d4705eea1997e34b73f562a9857302d8514f256 100644 --- a/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php +++ b/core/modules/editor/tests/src/Kernel/EditorFilterIntegrationTest.php @@ -24,7 +24,7 @@ class EditorFilterIntegrationTest extends KernelTestBase { public function testTextFormatIntegration() { // Create an arbitrary text format. $format = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => $this->randomString(), ]); $format->save(); diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php index 5e7ba126efcf0833f33e92ef7f82af6c4df8e834..e200b90b23047745301de493ab259d449c05c0b0 100644 --- a/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php +++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php @@ -68,7 +68,7 @@ public function testBooleanField() { $label = $this->randomMachineName(); // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php index 5e7a3aaced55facd532339331ffee3761701f7c5..1834993ce60f9404700e4c3ccde30fddbdbc965c 100644 --- a/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php +++ b/core/modules/field/tests/src/Functional/Boolean/BooleanFormatterSettingsTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { parent::setUp(); // Create a content type. Use Node because it has Field UI pages that work. - $type_name = mb_strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->bundle = $type->id(); @@ -60,7 +60,7 @@ protected function setUp(): void { ]); $this->drupalLogin($admin_user); - $this->fieldName = mb_strtolower($this->randomMachineName(8)); + $this->fieldName = $this->randomMachineName(8); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php index 6171e08f100d9af0d8cfb9a8fcf3fdb654023cb9..1bcd8aa65c98e7d5a913b23d9385bd0ffa307dce 100644 --- a/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php +++ b/core/modules/field/tests/src/Functional/Email/EmailFieldTest.php @@ -58,7 +58,7 @@ protected function setUp(): void { */ public function testEmailField() { // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php index 5c2d299fcfae4ae310aa314b7b99c4e837337b81..3be9c473a41bbd4fb0e0009e7f760cd30a212905 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php @@ -57,7 +57,7 @@ protected function setUp(): void { $this->drupalPlaceBlock('system_breadcrumb_block'); // Create a content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->type = $type->id(); @@ -303,7 +303,7 @@ public function testMultipleTargetBundles() { /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */ $vocabularies = []; for ($i = 0; $i < 2; $i++) { - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $vocabularies[$i] = Vocabulary::create([ 'name' => $this->randomString(), 'vid' => $vid, @@ -374,7 +374,7 @@ protected function createEntityReferenceField($target_type, $bundles = []) { $bundle_path = 'admin/structure/types/manage/' . $this->type; // Generate a random field name, must be only lowercase characters. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $storage_edit = $field_edit = []; $storage_edit['settings[target_type]'] = $target_type; diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php index 894cf63fe9e8f123d27289dea532c1da8321526f..991214a4bb0e2914426742b7637542ae62ecd622 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php @@ -162,7 +162,7 @@ public function testMultipleTargetBundles() { /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */ $vocabularies = []; for ($i = 0; $i < 2; $i++) { - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $vocabularies[$i] = Vocabulary::create([ 'name' => $this->randomMachineName(), 'vid' => $vid, @@ -173,7 +173,7 @@ public function testMultipleTargetBundles() { // Create a taxonomy term entity reference field that saves the auto-created // taxonomy terms in the second vocabulary from the two that were configured // as targets. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ $vocabularies[0]->id() => $vocabularies[0]->id(), @@ -261,7 +261,7 @@ public function testNoBundles() { ]); $this->drupalLogin($account); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $handler_settings = [ 'auto_create' => TRUE, ]; diff --git a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php index f0c55c80ab911a80a24a2dac65595ed54e7de6af..8a94bc7ce395ba95432a89886cdf2b1fd11c2c1c 100644 --- a/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php +++ b/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldDefaultValueTest.php @@ -64,7 +64,7 @@ public function testEntityReferenceDefaultValue() { // Create a node to be referenced. $referenced_node = $this->drupalCreateNode(['type' => 'referenced_content']); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', @@ -129,7 +129,7 @@ public function testEntityReferenceDefaultConfigValue() { $referenced_node_type = $this->drupalCreateContentType(['type' => 'referenced_config_to_delete']); $referenced_node_type2 = $this->drupalCreateContentType(['type' => 'referenced_config_to_preserve']); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php index f7f9f0f9af7032d0ae4e8ace2437094303e16e39..ac025d78f66104f9cf3588f416ced70feab68215 100644 --- a/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php +++ b/core/modules/field/tests/src/Functional/FunctionalString/StringFieldTest.php @@ -63,7 +63,7 @@ public function testTextfieldWidgets() { */ public function _testTextfieldWidgets($field_type, $widget_type) { // Create a field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php index a7fb5a42713840016b00ebaeec5492655e4f8890..f5317dcc85394ee918b519c0749eb9f1008549fb 100644 --- a/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php +++ b/core/modules/field/tests/src/Functional/Number/NumberFieldTest.php @@ -47,7 +47,7 @@ protected function setUp(): void { */ public function testNumberDecimalField() { // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -138,7 +138,7 @@ public function testNumberIntegerField() { $maximum = rand(2000, 4000); // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -290,7 +290,7 @@ public function testNumberIntegerField() { */ public function testNumberFloatField() { // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -383,7 +383,7 @@ public function testNumberFloatField() { */ public function testCreateNumberFloatField() { // Create a float field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -408,7 +408,7 @@ public function testCreateNumberFloatField() { */ public function testCreateNumberDecimalField() { // Create a decimal field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field/tests/src/Functional/TranslationWebTest.php b/core/modules/field/tests/src/Functional/TranslationWebTest.php index aeee7c51275068185fa314f58b58a8f387101880..54b1faf9d46a2e17eb178e5a16ed1e76f2c2ed94 100644 --- a/core/modules/field/tests/src/Functional/TranslationWebTest.php +++ b/core/modules/field/tests/src/Functional/TranslationWebTest.php @@ -60,7 +60,7 @@ class TranslationWebTest extends FieldTestBase { protected function setUp(): void { parent::setUp(); - $this->fieldName = mb_strtolower($this->randomMachineName() . '_field_name'); + $this->fieldName = $this->randomMachineName() . '_field_name'; $field_storage = [ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php index 583852beccdf8055d84b3237a35049b2d8ff56e3..c7ebc597a6e15d52b654e2aef689e83dd98a8694 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php @@ -46,7 +46,7 @@ protected function setUp(): void { parent::setUp(); // Create a content type. Use Node because it has Field UI pages that work. - $type_name = mb_strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->bundle = $type->id(); @@ -60,7 +60,7 @@ protected function setUp(): void { ]); $this->drupalLogin($admin_user); - $this->fieldName = mb_strtolower($this->randomMachineName(8)); + $this->fieldName = $this->randomMachineName(8); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php index 6b32c4eedc029521671aa58d4d9d6d9a27e66dac..5e0fb206b50e569ecbdf7e80f89d8cfe6d76d6b3 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php @@ -65,12 +65,12 @@ protected function setUp(): void { $this->drupalPlaceBlock('system_breadcrumb_block'); // Create a content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->type = $type->id(); // Create a second content type, to be a target for entity reference fields. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->targetType = $type->id(); diff --git a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php index 52367794517847e663b96647e3480472b80ce556..e06acc1b1408baea18ea2f725f8b3c2c00f5c8e5 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php @@ -45,9 +45,9 @@ protected function setUp(): void { * Tests default formatter behavior. */ public function testNumberFormatter() { - $type = mb_strtolower($this->randomMachineName()); - $float_field = mb_strtolower($this->randomMachineName()); - $integer_field = mb_strtolower($this->randomMachineName()); + $type = $this->randomMachineName(); + $float_field = $this->randomMachineName(); + $integer_field = $this->randomMachineName(); $thousand_separators = ['', '.', ',', ' ', chr(8201), "'"]; $decimal_separators = ['.', ',']; $prefix = $this->randomMachineName(); diff --git a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php index acebe47fdaa0c68781cd811c4cc7a4f52f1a8958..06e22f6a8321f23324be6cfada907db5dabb7082 100644 --- a/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/Boolean/BooleanFormatterTest.php @@ -60,7 +60,7 @@ protected function setUp(): void { $this->entityType = 'entity_test'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php index 10fda5adc58467dabae02c7fcdf128f631cfbf97..cb59668fae38adc75403139c16c32509ede89e53 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceItemTest.php @@ -88,7 +88,7 @@ protected function setUp(): void { $this->vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, ]); $this->vocabulary->save(); @@ -291,7 +291,7 @@ public function testConfigEntityReferenceItem() { // Make sure the computed term reflects updates to the term id. $vocabulary2 = $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, ]); $vocabulary2->save(); @@ -362,7 +362,7 @@ public function testEntitySaveOrder() { * Tests that the 'handler' field setting stores the proper plugin ID. */ public function testSelectionHandlerSettings() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php index 92b4fa1da2936060ba69e40bc8ef0ffdf3a85bf9..7a5301c4aff261987bfe5c8d39be1b57dec5155f 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceSettingsTest.php @@ -72,13 +72,13 @@ protected function setUp(): void { $this->installEntitySchema('entity_test'); $this->nodeType = NodeType::create([ - 'type' => mb_strtolower($this->randomMachineName()), + 'type' => $this->randomMachineName(), 'name' => $this->randomString(), ]); $this->nodeType->save(); // Create a custom bundle. - $this->customBundle = 'test_bundle_' . mb_strtolower($this->randomMachineName()); + $this->customBundle = 'test_bundle_' . $this->randomMachineName(); entity_test_create_bundle($this->customBundle, NULL, 'entity_test'); // Prepare the logger for collecting the expected critical error. @@ -93,7 +93,7 @@ public function testConfigTargetBundleDeletion() { /** @var \Drupal\taxonomy\Entity\Vocabulary[] $vocabularies */ $vocabularies = []; for ($i = 0; $i < 2; $i++) { - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $vocabularies[$i] = Vocabulary::create([ 'name' => $this->randomString(), 'vid' => $vid, @@ -101,7 +101,7 @@ public function testConfigTargetBundleDeletion() { $vocabularies[$i]->save(); } // Attach an entity reference field to $this->nodeType. - $name = mb_strtolower($this->randomMachineName()); + $name = $this->randomMachineName(); $label = $this->randomString(); $handler_settings = [ 'target_bundles' => [ @@ -150,7 +150,7 @@ public function testConfigTargetBundleDeletion() { */ public function testCustomTargetBundleDeletion() { // Attach an entity reference field to $this->nodeType. - $name = mb_strtolower($this->randomMachineName()); + $name = $this->randomMachineName(); $label = $this->randomString(); $handler_settings = ['target_bundles' => [$this->customBundle => $this->customBundle]]; $this->createEntityReferenceField('node', $this->nodeType->id(), $name, $label, 'entity_test', 'default', $handler_settings); diff --git a/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php b/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php index 505eca676b59c5ea090bd3aa69b8201ee00c9dee..c0cf2c69d9f382726186e343904c861c87b091b5 100644 --- a/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php +++ b/core/modules/field/tests/src/Kernel/EntityReference/Views/SelectionTest.php @@ -60,7 +60,7 @@ protected function setUp(): void { $this->installEntitySchema('node'); // Create test nodes. - $type = strtolower($this->randomMachineName()); + $type = $this->randomMachineName(); NodeType::create(['type' => $type])->save(); $node1 = $this->createNode(['type' => $type]); $node2 = $this->createNode(['type' => $type]); diff --git a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php index 117b80cc7d18327f97196e7a4f323e1eb5c4a800..751ec5cd5a0ebc2e2fd368a93e076697089e1c3c 100644 --- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php +++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php @@ -294,7 +294,7 @@ public function testEntityCreateBundle() { $cardinality = $this->fieldTestData->field_storage->getCardinality(); // Create a new bundle. - $new_bundle = 'test_bundle_' . mb_strtolower($this->randomMachineName()); + $new_bundle = 'test_bundle_' . $this->randomMachineName(); entity_test_create_bundle($new_bundle, NULL, $entity_type); // Add a field to that bundle. @@ -321,7 +321,7 @@ public function testEntityDeleteBundle() { $this->createFieldWithStorage('', $entity_type); // Create a new bundle. - $new_bundle = 'test_bundle_' . mb_strtolower($this->randomMachineName()); + $new_bundle = 'test_bundle_' . $this->randomMachineName(); entity_test_create_bundle($new_bundle, NULL, $entity_type); // Add a field to that bundle. @@ -329,7 +329,7 @@ public function testEntityDeleteBundle() { FieldConfig::create($this->fieldTestData->field_definition)->save(); // Create a second field for the test bundle - $field_name = mb_strtolower($this->randomMachineName() . '_field_name'); + $field_name = $this->randomMachineName() . '_field_name'; $field_storage = [ 'field_name' => $field_name, 'entity_type' => $entity_type, diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php index 0742f856f8c11d79046a05460ad9660c908021db..66087c97076c809f16d56f020a0e32bd6702388d 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -45,7 +45,7 @@ protected function setUp(): void { parent::setUp(); $this->fieldStorageDefinition = [ - 'field_name' => mb_strtolower($this->randomMachineName()), + 'field_name' => $this->randomMachineName(), 'entity_type' => 'entity_test', 'type' => 'test_field', ]; @@ -201,7 +201,7 @@ protected function doFieldPropertyConstraintsTests() { * Tests creating a field with custom storage set. */ public function testCreateFieldCustomStorage() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); \Drupal::state()->set('field_test_custom_storage', $field_name); $field_storage = FieldStorageConfig::create([ diff --git a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php index 3d81d09d56549007c34f35b07f7b59659077c112..09801aea26b2576a68a650ecb05d5b4d04311c62 100644 --- a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php +++ b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php @@ -67,7 +67,7 @@ protected function setUp(): void { $this->entityType = 'entity_test_rev'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/FieldFormatterTest.php b/core/modules/field/tests/src/Kernel/FieldFormatterTest.php index d02f238daad43ffa00adac4a722fcdfad20072dd..130233c9d747d96b7247a2876a941e2bde167ede 100644 --- a/core/modules/field/tests/src/Kernel/FieldFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/FieldFormatterTest.php @@ -54,7 +54,7 @@ protected function setUp(): void { $entity_type = 'entity_test_rev'; $bundle = $entity_type; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php index 5200f8e0152e6a8781e8b4599be8eecd43883cda..a6dd4bae1cf50f8fcdc60afe87a4d9f432c6ff92 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -98,7 +98,7 @@ protected function createFieldWithStorage($suffix = '', $entity_type = 'entity_t $field = 'field' . $suffix; $field_definition = 'field_definition' . $suffix; - $this->fieldTestData->$field_name = mb_strtolower($this->randomMachineName() . '_field_name' . $suffix); + $this->fieldTestData->$field_name = $this->randomMachineName() . '_field_name' . $suffix; $this->fieldTestData->$field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldTestData->$field_name, 'entity_type' => $entity_type, diff --git a/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php b/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php index 7bdaba59564717d53240b4b27edee70328f3bb71..ca57b071bd43614e458b0211072c34809a873ed0 100644 --- a/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/KernelString/RawStringFormatterTest.php @@ -62,7 +62,7 @@ protected function setUp(): void { $this->entityType = 'entity_test'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php b/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php index 94878dbd12754d63d523640eda1415401b449514..36551fb4acb20febc47b3f8f3466e8a085f6bb41 100644 --- a/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/KernelString/StringFormatterTest.php @@ -72,7 +72,7 @@ protected function setUp(): void { $this->entityType = 'entity_test_rev'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php index 2e5e7349aafbe037b5dfa8c964b1c788aa9f9439..d846586b4f2232b15d79dda18f140fd629996411 100644 --- a/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/Timestamp/TimestampFormatterTest.php @@ -60,7 +60,7 @@ protected function setUp(): void { $this->entityType = 'entity_test'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, diff --git a/core/modules/field/tests/src/Kernel/TranslationTest.php b/core/modules/field/tests/src/Kernel/TranslationTest.php index 0cd0c0946c8f184626ca5c02134ef9a553fbae24..8e9dc31bb2808bed0d3f6accc43f53e34391d0bc 100644 --- a/core/modules/field/tests/src/Kernel/TranslationTest.php +++ b/core/modules/field/tests/src/Kernel/TranslationTest.php @@ -76,7 +76,7 @@ protected function setUp(): void { $this->installEntitySchema('node'); $this->installConfig(['language']); - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->entityType = 'entity_test'; @@ -141,7 +141,7 @@ public function testTranslatableFieldSaveLoad() { } // Test default values. - $field_name_default = mb_strtolower($this->randomMachineName() . '_field_name'); + $field_name_default = $this->randomMachineName() . '_field_name'; $field_storage_definition = $this->fieldStorageDefinition; $field_storage_definition['field_name'] = $field_name_default; $field_storage = FieldStorageConfig::create($field_storage_definition); diff --git a/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php b/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php index 1ea0db728dc8c43f9f8f73ffd24c0655ca705a3e..f0defeedcd5235ce852020fcf4fc7d5318caa58f 100644 --- a/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php +++ b/core/modules/field/tests/src/Kernel/Uri/UriItemTest.php @@ -37,7 +37,7 @@ public function testUriField() { $label = $this->randomMachineName(); // Create a field with settings to validate. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php index fea239374b6f2cf97691f9cb77eeedc57aeb1d74..5343cc444c736f725b93a08523056c497695b315 100644 --- a/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php +++ b/core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php @@ -65,7 +65,7 @@ public function testEntityViewModeUI() { // Test adding a view mode including dots in machine_name. $this->clickLink('Test entity'); $edit = [ - 'id' => strtolower($this->randomMachineName()) . '.' . strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName() . '.' . $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->submitForm($edit, 'Save'); @@ -73,7 +73,7 @@ public function testEntityViewModeUI() { // Test adding a view mode. $edit = [ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->submitForm($edit, 'Save'); @@ -119,7 +119,7 @@ public function testEntityFormModeUI() { // Test adding a view mode including dots in machine_name. $this->clickLink('Test entity'); $edit = [ - 'id' => strtolower($this->randomMachineName()) . '.' . strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName() . '.' . $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->submitForm($edit, 'Save'); @@ -127,7 +127,7 @@ public function testEntityFormModeUI() { // Test adding a form mode. $edit = [ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->submitForm($edit, 'Save'); diff --git a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php index b83dd5a025bfac9cdaace999847430c8678adc3e..b0631dde7eeb1a845f4f317df4df99ef913326f3 100644 --- a/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php +++ b/core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php @@ -78,7 +78,7 @@ public function testDeleteField() { $field_name = 'field_test'; // Create an additional node type. - $type_name1 = strtolower($this->randomMachineName(8)) . '_test'; + $type_name1 = $this->randomMachineName(8) . '_test'; $type1 = $this->drupalCreateContentType(['name' => $type_name1, 'type' => $type_name1]); $type_name1 = $type1->id(); @@ -87,7 +87,7 @@ public function testDeleteField() { $this->fieldUIAddNewField($bundle_path1, $field_name_input, $field_label); // Create an additional node type. - $type_name2 = strtolower($this->randomMachineName(8)) . '_test'; + $type_name2 = $this->randomMachineName(8) . '_test'; $type2 = $this->drupalCreateContentType(['name' => $type_name2, 'type' => $type_name2]); $type_name2 = $type2->id(); diff --git a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php index d1af28fc86cd9a92370c38f9705fec38ae5340d4..254704993e4048371bf12b4a97e09ea311c4692d 100644 --- a/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php +++ b/core/modules/field_ui/tests/src/Functional/ManageDisplayTest.php @@ -79,7 +79,7 @@ protected function setUp(): void { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->type = $type->id(); @@ -87,7 +87,7 @@ protected function setUp(): void { $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, 'help' => '', 'nodes' => ['article' => 'article'], diff --git a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php index c1fc660c4003c7ccdbb0a652234130f748e60e00..349aa8a69184bdeb44541842200ad47cf1d2623c 100644 --- a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php +++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php @@ -104,13 +104,13 @@ protected function setUp(): void { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->contentType = $type->id(); // Create random field name with markup to test escaping. $this->fieldLabel = '<em>' . $this->randomMachineName(8) . '</em>'; - $this->fieldNameInput = strtolower($this->randomMachineName(8)); + $this->fieldNameInput = $this->randomMachineName(8); $this->fieldName = 'field_' . $this->fieldNameInput; // Create Basic page and Article node types. @@ -477,7 +477,7 @@ public function assertFieldSettings(string $bundle, string $field_name, string $ */ public function testFieldPrefix() { // Change default field prefix. - $field_prefix = strtolower($this->randomMachineName(10)); + $field_prefix = $this->randomMachineName(10); $this->config('field_ui.settings')->set('field_prefix', $field_prefix)->save(); // Create a field input and label exceeding the new maxlength, which is 22. @@ -600,7 +600,7 @@ public function testDeleteField() { $this->fieldUIAddNewField($bundle_path1, $this->fieldNameInput, $this->fieldLabel); // Create an additional node type. - $type_name2 = strtolower($this->randomMachineName(8)) . '_test'; + $type_name2 = $this->randomMachineName(8) . '_test'; $type2 = $this->drupalCreateContentType(['name' => $type_name2, 'type' => $type_name2]); $type_name2 = $type2->id(); @@ -659,7 +659,7 @@ public function testDisallowedFieldNames() { public function testLockedField() { // Create a locked field and attach it to a bundle. We need to do this // programmatically as there's no way to create a locked field through UI. - $field_name = strtolower($this->randomMachineName(8)); + $field_name = $this->randomMachineName(8); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php index 59e70d11d5eba21cd18f7401b7fdb83d544a1d4a..e782b5255a12f0511f983b3bd5d731433eeb401c 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php @@ -71,7 +71,7 @@ protected function setUp(): void { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $this->type = $type->id(); diff --git a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php index 8610bab794de15259917a75a902b20d932789de5..bce2bafccbc4db79ff62cf717449a8b55a104d36 100644 --- a/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php +++ b/core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php @@ -533,14 +533,14 @@ public function testComponentDependencies() { // Create two arbitrary user roles. for ($i = 0; $i < 2; $i++) { $roles[$i] = Role::create([ - 'id' => mb_strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $this->randomString(), ]); $roles[$i]->save(); } // Create a field of type 'test_field' attached to 'entity_test'. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php index 43dfa4fc23841505b68b1a6ce46c9c5b0394ec08..52d46385b93eb29a38fb3c55582d0fb2c50b240c 100644 --- a/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php @@ -25,7 +25,7 @@ class FileFieldDisplayTest extends FileFieldTestBase { * Tests normal formatter display on node display. */ public function testNodeDisplay() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $type_name = 'article'; $field_storage_settings = [ 'display_field' => '1', @@ -131,7 +131,7 @@ public function testNodeDisplay() { * Tests default display of File Field. */ public function testDefaultFileFieldDisplay() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $type_name = 'article'; $field_storage_settings = [ 'display_field' => '1', @@ -160,7 +160,7 @@ public function testDefaultFileFieldDisplay() { public function testDescToggle() { $type_name = 'test'; $field_type = 'file'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Use the UI to add a new content type that also contains a file field. $edit = [ 'name' => $type_name, @@ -190,7 +190,7 @@ public function testDescToggle() { * Tests description display of File Field. */ public function testDescriptionDefaultFileFieldDisplay() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $type_name = 'article'; $field_storage_settings = [ 'display_field' => '1', diff --git a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php index 0e8100c154542aed74f2b46a2503c72f4f0dd42b..95deedc0355a45b47f7a2a03c4b680150a28f6c4 100644 --- a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php @@ -25,7 +25,7 @@ class FileFieldFormatterAccessTest extends FileFieldTestBase { */ public function testFileAccessHandler() { $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); \Drupal::state()->set('file_test_alternate_access_handler', TRUE); \Drupal::entityTypeManager()->clearCachedDefinitions(); diff --git a/core/modules/file/tests/src/Functional/FileFieldPathTest.php b/core/modules/file/tests/src/Functional/FileFieldPathTest.php index 4a139ab7da5164561a256fa0e199d77b2f5b37d1..084e492b2dfa36cf83ca25d80483b0ec0d6720e3 100644 --- a/core/modules/file/tests/src/Functional/FileFieldPathTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldPathTest.php @@ -23,7 +23,7 @@ class FileFieldPathTest extends FileFieldTestBase { public function testUploadPath() { /** @var \Drupal\node\NodeStorageInterface $node_storage */ $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $type_name = 'article'; $this->createFileField($field_name, 'node', $type_name); /** @var \Drupal\file\FileInterface $test_file */ diff --git a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php index fced38d132a266214f587276868e098c7323452e..5473fcac398ec788986ba7cc30f9429e7df7a466 100644 --- a/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldRSSContentTest.php @@ -28,7 +28,7 @@ class FileFieldRSSContentTest extends FileFieldTestBase { */ public function testFileFieldRSSContent() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $type_name = 'article'; $this->createFileField($field_name, 'node', $type_name); diff --git a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php index 641093dc7addbb9b9714d04314fc5e77d925278f..1b472927b79dc07ad52db352f316ad6c74523954 100644 --- a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php @@ -36,7 +36,7 @@ public function testRevisions() { ->save(); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); // Create the same fields for users. $this->createFileField($field_name, 'user', 'user'); diff --git a/core/modules/file/tests/src/Functional/FileFieldValidateTest.php b/core/modules/file/tests/src/Functional/FileFieldValidateTest.php index 292d24abc07c123bcb4c22ab67056011df75263e..4cc0aaf885398667ae84fbc371e8fd140a27b19f 100644 --- a/core/modules/file/tests/src/Functional/FileFieldValidateTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldValidateTest.php @@ -28,7 +28,7 @@ class FileFieldValidateTest extends FileFieldTestBase { public function testRequired() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $storage = $this->createFileField($field_name, 'node', $type_name, [], ['required' => '1']); $field = FieldConfig::loadByName('node', $type_name, $field_name); @@ -78,7 +78,7 @@ public function testRequired() { public function testFileMaxSize() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name, [], ['required' => '1']); // 128KB. @@ -130,7 +130,7 @@ public function testFileMaxSize() { public function testFileExtension() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $test_file = $this->getTestFile('image'); diff --git a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php index 4f9051979a4dcbfa3526079211d3057eeef1a614..83e12945fd60a9e0097cbe693fb5805bf904981b 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -81,7 +81,7 @@ protected function createTemporaryFile($data, UserInterface $user = NULL) { public function testSingleValuedWidget() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $test_file = $this->getTestFile('text'); @@ -250,7 +250,7 @@ public function testPrivateFileSetting() { user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $field = FieldConfig::loadByName('node', $type_name, $field_name); $field_id = $field->id(); @@ -299,7 +299,7 @@ public function testPrivateFileComment() { // Create a new field. $this->addDefaultCommentField('node', 'article'); - $name = strtolower($this->randomMachineName()); + $name = $this->randomMachineName(); $label = $this->randomMachineName(); $storage_edit = ['settings[uri_scheme]' => 'private']; $this->fieldUIAddNewField('admin/structure/comment/manage/comment', $name, $label, 'file', $storage_edit); @@ -362,7 +362,7 @@ public function testPrivateFileComment() { */ public function testWidgetValidation() { $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $this->updateFileField($field_name, $type_name, ['file_extensions' => 'txt']); @@ -391,7 +391,7 @@ public function testWidgetValidation() { * Tests file widget element. */ public function testWidgetElement() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $html_name = str_replace('_', '-', $field_name); $this->createFileField($field_name, 'node', 'article', ['cardinality' => FieldStorageConfig::CARDINALITY_UNLIMITED]); $file = $this->getTestFile('text'); @@ -477,7 +477,7 @@ public function testMaximumUploadFileSizeValidation() { user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); /** @var \Drupal\Field\FieldConfigInterface $field */ $field = FieldConfig::loadByName('node', $type_name, $field_name); @@ -504,7 +504,7 @@ public function testFileExtensionsSetting() { user_role_grant_permissions($this->adminUser->roles[0]->target_id, ['administer node fields']); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $field = FieldConfig::loadByName('node', $type_name, $field_name); $field_id = $field->id(); diff --git a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php index cce9408ceb101d6bbd3ff6f86bcfc4c9802dcec4..41df460cb71483f60a5d8c11843d7f752c8540c8 100644 --- a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php +++ b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php @@ -45,7 +45,7 @@ protected function setUp(): void { $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page', 'new_revision' => FALSE]); // Create a file field on the "Basic page" node type. - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->createFileField($this->fieldName, 'node', 'page'); // Create and log in user. diff --git a/core/modules/file/tests/src/Functional/FilePrivateTest.php b/core/modules/file/tests/src/Functional/FilePrivateTest.php index 9eb41af8f6bd10bdc00aba1499593294abf9ba73..05d1bba1c989e84f9b06a44c195b6c39c0389d2f 100644 --- a/core/modules/file/tests/src/Functional/FilePrivateTest.php +++ b/core/modules/file/tests/src/Functional/FilePrivateTest.php @@ -47,7 +47,7 @@ public function testPrivateFile() { /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); $type_name = 'article'; - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name, ['uri_scheme' => 'private']); $test_file = $this->getTestFile('text'); diff --git a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php index 86fe0ed5d1768bff69d5d11277133dbce2965c74..67cb13cb2b672dda4db73d7ccc8924fbc8cd0f37 100644 --- a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php +++ b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php @@ -31,7 +31,7 @@ public function testFileTokenReplacement() { // Create file field. $type_name = 'article'; - $field_name = 'field_' . strtolower($this->randomMachineName()); + $field_name = 'field_' . $this->randomMachineName(); $this->createFileField($field_name, 'node', $type_name); $test_file = $this->getTestFile('text'); diff --git a/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php b/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php index df630fad2a1fd817d6b57bd03b824b9bc013272d..af57e3d7c9a4ed5389eb39c7e8e3bd09648a3845 100644 --- a/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php +++ b/core/modules/file/tests/src/Functional/Formatter/FileMediaFormatterTestBase.php @@ -46,7 +46,7 @@ protected function setUp(): void { */ protected function createMediaField($formatter, $file_extensions, array $formatter_settings = []) { $entity_type = $bundle = 'entity_test'; - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'entity_type' => $entity_type, diff --git a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php index d116babc53f203978042b2b7572fb3de72bed4c8..8f40b33c09dfe98397fd5432e61e4ae7f0d32250 100644 --- a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php +++ b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php @@ -39,7 +39,7 @@ protected function setUp(): void { $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); // Create a file field on the "Basic page" node type. - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->createFileField($this->fieldName, 'node', 'page', ['uri_scheme' => 'private']); // Create and log in user. diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php index 1d50b3bfd7a49f3dc8c9ea61d51d0f03a98d25e1..45028027616657ce69bd356ea8cf9149a0fd5aa8 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php @@ -33,7 +33,7 @@ class FileFieldValidateTest extends WebDriverTestBase { * Tests the validation message is displayed only once for ajax uploads. */ public function testAjaxValidationMessage() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); $this->createFileField($field_name, 'node', 'article', [], ['file_extensions' => 'txt']); diff --git a/core/modules/filter/tests/src/Functional/FilterAdminTest.php b/core/modules/filter/tests/src/Functional/FilterAdminTest.php index a947bb841af68b143ebcf6dfeb237109997c8828..4eb5daab474664dda0a3322f39436b19e9173fc4 100644 --- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php +++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php @@ -129,7 +129,7 @@ public function testFormatAdmin() { // Add text format. $this->drupalGet('admin/config/content/formats'); $this->clickLink('Add text format'); - $format_id = mb_strtolower($this->randomMachineName()); + $format_id = $this->randomMachineName(); $name = $this->randomMachineName(); $edit = [ 'format' => $format_id, @@ -248,7 +248,7 @@ public function testFilterAdmin() { // Add format. $edit = []; - $edit['format'] = mb_strtolower($this->randomMachineName()); + $edit['format'] = $this->randomMachineName(); $edit['name'] = $this->randomMachineName(); $edit['roles[' . RoleInterface::AUTHENTICATED_ID . ']'] = 1; $edit['filters[' . $second_filter . '][status]'] = TRUE; @@ -412,14 +412,14 @@ public function testFilterTipHtmlEscape() { */ public function testDisabledFormat() { // Create a node type and add a standard body field. - $node_type = NodeType::create(['type' => mb_strtolower($this->randomMachineName())]); + $node_type = NodeType::create(['type' => $this->randomMachineName()]); $node_type->save(); node_add_body_field($node_type, $this->randomString()); // Create a text format with a filter that returns a static string. $format = FilterFormat::create([ 'name' => $this->randomString(), - 'format' => $format_id = mb_strtolower($this->randomMachineName()), + 'format' => $format_id = $this->randomMachineName(), ]); $format->setFilterConfig('filter_static_text', ['status' => TRUE]); $format->save(); diff --git a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php index a2a9a415ebf30e6572f1008d5ea8c3fc93374928..97ef25a641e8f235b0b4f13d636c00ea4aae7704 100644 --- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php +++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php @@ -35,7 +35,7 @@ public function testDefaultTextFormats() { $formats = []; for ($i = 0; $i < 2; $i++) { $edit = [ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => $this->randomMachineName(), ]; $this->drupalGet('admin/config/content/formats/add'); diff --git a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php index 98cc8e42d57450c07d46efafdf32e284d6bab8c9..e96a7c806aa228595f0205995746c4469e3d6910 100644 --- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php +++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php @@ -94,7 +94,7 @@ protected function setUp(): void { $formats = []; for ($i = 0; $i < 3; $i++) { $edit = [ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => $this->randomMachineName(), ]; $this->drupalGet('admin/config/content/formats/add'); diff --git a/core/modules/filter/tests/src/Functional/FilterHooksTest.php b/core/modules/filter/tests/src/Functional/FilterHooksTest.php index c8e33190b8671d0f40b83f5986a2c3fe2661bbaf..e80141bc696f6768a41cf4eb0ba080e4e69217e4 100644 --- a/core/modules/filter/tests/src/Functional/FilterHooksTest.php +++ b/core/modules/filter/tests/src/Functional/FilterHooksTest.php @@ -32,7 +32,7 @@ class FilterHooksTest extends BrowserTestBase { */ public function testFilterHooks() { // Create content type, with underscores. - $type_name = 'test_' . strtolower($this->randomMachineName()); + $type_name = 'test_' . $this->randomMachineName(); $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); $node_permission = "create $type_name content"; @@ -46,7 +46,7 @@ public function testFilterHooks() { // Add a text format. $name = $this->randomMachineName(); $edit = []; - $edit['format'] = mb_strtolower($this->randomMachineName()); + $edit['format'] = $this->randomMachineName(); $edit['name'] = $name; $edit['roles[' . RoleInterface::ANONYMOUS_ID . ']'] = 1; $this->drupalGet('admin/config/content/formats/add'); diff --git a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php index 38f8ded293e1a2b10aa8b5287f8d86dd4af2f5af..d62f0a0e3d94396c6ecb072bf81513522bc0538c 100644 --- a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php @@ -80,7 +80,7 @@ public function testStyle() { $admin_path = 'admin/config/media/image-styles'; // Setup a style to be created and effects to add to it. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomString(); $style_path = $admin_path . '/manage/' . $style_name; $effect_edits = [ @@ -197,7 +197,7 @@ public function testStyle() { // Test the style overview form. // Change the name of the style and adjust the weights of effects. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomMachineName(); $weight = count($effect_edits); $edit = [ @@ -317,14 +317,14 @@ public function testStyle() { */ public function testStyleReplacement() { // Create a new style. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomString(); $style = ImageStyle::create(['name' => $style_name, 'label' => $style_label]); $style->save(); $style_path = 'admin/config/media/image-styles/manage/'; // Create an image field that uses the new style. - $field_name = strtolower($this->randomMachineName(10)); + $field_name = $this->randomMachineName(10); $this->createImageField($field_name, 'article'); \Drupal::service('entity_display.repository') ->getViewDisplay('node', 'article') @@ -351,7 +351,7 @@ public function testStyleReplacement() { $this->assertSession()->responseContains($file_url_generator->transformRelative($style->buildUrl($original_uri))); // Rename the style and make sure the image field is updated. - $new_style_name = strtolower($this->randomMachineName(10)); + $new_style_name = $this->randomMachineName(10); $new_style_label = $this->randomString(); $edit = [ 'name' => $new_style_name, @@ -441,7 +441,7 @@ public function testFlushUserInterface() { $admin_path = 'admin/config/media/image-styles'; // Create a new style. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style = ImageStyle::create(['name' => $style_name, 'label' => $this->randomString()]); $style->save(); @@ -471,13 +471,13 @@ public function testFlushUserInterface() { */ public function testConfigImport() { // Create a new style. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomString(); $style = ImageStyle::create(['name' => $style_name, 'label' => $style_label]); $style->save(); // Create an image field that uses the new style. - $field_name = strtolower($this->randomMachineName(10)); + $field_name = $this->randomMachineName(10); $this->createImageField($field_name, 'article'); \Drupal::service('entity_display.repository') ->getViewDisplay('node', 'article') diff --git a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php index 7ee4a19a451760bfaebe4835d82919df935f1114..9ac7dd18f3e2ec766c69b2a0dad4efaa76f7c0db 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php @@ -62,7 +62,7 @@ public function testDefaultImages() { // Create an image field storage and add a field to the article content // type. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $storage_settings['default_image'] = [ 'uuid' => $default_images['field_storage']->uuid(), 'alt' => '', @@ -261,7 +261,7 @@ public function testDefaultImages() { */ public function testInvalidDefaultImage() { $field_storage = FieldStorageConfig::create([ - 'field_name' => mb_strtolower($this->randomMachineName()), + 'field_name' => $this->randomMachineName(), 'entity_type' => 'node', 'type' => 'image', 'settings' => [ diff --git a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php index 7502129a79a07cc74f79f3f58cca7974194d4394..4874e98f49978a44af19794928d2576180e33df0 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php @@ -59,7 +59,7 @@ public function _testImageFieldFormatters($scheme) { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_settings = ['alt_field_required' => 0]; $instance = $this->createImageField($field_name, 'article', ['uri_scheme' => $scheme], $field_settings); @@ -246,7 +246,7 @@ public function testImageFieldSettings() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); $test_image = current($this->drupalGetTestFiles('image')); [, $test_image_extension] = explode('.', $test_image->filename); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_settings = [ 'alt_field' => 1, 'file_extensions' => $test_image_extension, @@ -364,7 +364,7 @@ public function testImageLoadingAttribute(): void { /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_settings = ['alt_field_required' => 0]; $instance = $this->createImageField($field_name, 'article', [], $field_settings); @@ -480,7 +480,7 @@ public function testImageFieldDefaultImage() { $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); // Create a new image field. - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article'); // Create a new node, with no images and verify that no images are @@ -569,7 +569,7 @@ public function testImageFieldDefaultImage() { $this->assertEmpty($default_image['uuid'], 'Default image removed from field.'); // Create an image field that uses the private:// scheme and test that the // default image works as expected. - $private_field_name = strtolower($this->randomMachineName()); + $private_field_name = $this->randomMachineName(); $this->createImageField($private_field_name, 'article', ['uri_scheme' => 'private']); // Add a default image to the new field. $edit = [ diff --git a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php index 6bd66cf834a860902ea8c92f65a7b6df5260a221..3228669215a87196edcbecc863f3366cff854250 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -29,7 +29,7 @@ public function testValid() { $file_system = $this->container->get('file_system'); $image_files = $this->drupalGetTestFiles('image'); - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article', [], ['file_directory' => 'test-upload']); $expected_path = 'public://test-upload'; @@ -89,9 +89,9 @@ public function testValid() { */ public function testResolution() { $field_names = [ - 0 => strtolower($this->randomMachineName()), - 1 => strtolower($this->randomMachineName()), - 2 => strtolower($this->randomMachineName()), + 0 => $this->randomMachineName(), + 1 => $this->randomMachineName(), + 2 => $this->randomMachineName(), ]; $min_resolution = [ 'width' => 50, @@ -163,7 +163,7 @@ public function testResolution() { * Tests that required alt/title fields gets validated right. */ public function testRequiredAttributes() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_settings = [ 'alt_field' => 1, 'alt_field_required' => 1, diff --git a/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php b/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php index 607435d91f95f461b4dfae9aced0e3b45c114bba..6d90777c4347966405a755f2ab30082bf36988dc 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldWidgetTest.php @@ -21,7 +21,7 @@ class ImageFieldWidgetTest extends ImageFieldTestBase { */ public function testWidgetElement() { // Check for image widget in add/node/article page - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $min_resolution = 50; $max_resolution = 100; $field_settings = [ diff --git a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php index 64d2f92c74774b1c9160a0f87a64c05862306c36..19538f36aea33dbe2da0c22a001cc329211866f0 100644 --- a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php +++ b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php @@ -49,7 +49,7 @@ protected function setUp(): void { $this->drupalCreateContentType(['type' => 'basicpage', 'name' => 'Basic page', 'new_revision' => FALSE]); // Create an image field on the "Basic page" node type. - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->createImageField($this->fieldName, 'basicpage', [], ['title_field' => 1]); // Create and log in user. diff --git a/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php b/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php index 820bedffa2888cea5164deee3ae6de825da66df1..177186466763ee560d35187e38ff7edd273f91a3 100644 --- a/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php +++ b/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php @@ -60,7 +60,7 @@ public function getImageCount($style, $wrapper) { public function testFlush() { // Setup a style to be created and effects to add to it. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomString(); $style_path = 'admin/config/media/image-styles/manage/' . $style_name; $effect_edits = [ diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php index f7b5b68d51542c52e42f91e5748299cf7e3ba574..ec53cc58e73461578f914683fc6a5fdb18a1eae5 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php @@ -23,7 +23,7 @@ public function testAjaxEnabledEffectForm() { $admin_path = 'admin/config/media/image-styles'; // Setup a style to be created and effects to add to it. - $style_name = strtolower($this->randomMachineName(10)); + $style_name = $this->randomMachineName(10); $style_label = $this->randomString(); $style_path = $admin_path . '/manage/' . $style_name; $effect_edit = [ diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php index b0a198312f8d1a7ba09c66598949baedbcd1c859..1bfe3e692e11fc744823f798269301b978d3fe3e 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php @@ -21,7 +21,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase { * Tests the validation message is displayed only once for ajax uploads. */ public function testAJAXValidationMessage() { - $field_name = strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article', ['cardinality' => -1]); $this->drupalGet('node/add/article'); diff --git a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php index 0def1eea416392db8f85a4f26c93e3889746f648..b2f67d1c4b299ffa747ec1297ee0ebe04c3da7cc 100644 --- a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php +++ b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php @@ -58,7 +58,7 @@ protected function setUp(): void { $this->entityType = 'entity_test'; $this->bundle = $this->entityType; - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); FieldStorageConfig::create([ 'entity_type' => $this->entityType, diff --git a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php index 2bd7360721c79d03336838280975fa3d96c6a0d6..2c1f529f5041043bd52ae556299e3c3cfe1f3cc7 100644 --- a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php +++ b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php @@ -212,8 +212,8 @@ public function testUserProfileTranslationWithPreferredAdminLanguage() { ]); // Create a field on the user entity. - $field_name = mb_strtolower($this->randomMachineName()); - $label = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); + $label = $this->randomMachineName(); $field_label_en = "English $label"; $field_label_es = "Español $label"; diff --git a/core/modules/link/tests/src/Functional/LinkFieldTest.php b/core/modules/link/tests/src/Functional/LinkFieldTest.php index 9f1255bce7bdd2d8335d7d16e01138fc93b6ffea..c6d2be3bd27454487130536c18c71b22144d6a9f 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldTest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php @@ -86,7 +86,7 @@ public function testLinkField() { * Tests link field URL validation. */ protected function doTestURLValidation() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, @@ -270,7 +270,7 @@ protected function assertInvalidEntries(string $field_name, array $invalid_entri * Tests the link title settings of a link field. */ protected function doTestLinkTitle() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, @@ -395,7 +395,7 @@ protected function doTestLinkTitle() { * Tests the default 'link' formatter. */ protected function doTestLinkFormatter() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, @@ -552,7 +552,7 @@ protected function doTestLinkFormatter() { * merged, since they involve different configuration and output. */ protected function doTestLinkSeparateFormatter() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, @@ -681,7 +681,7 @@ protected function doTestLinkSeparateFormatter() { protected function doTestLinkTypeOnLinkWidget() { $link_type = LinkItemInterface::LINK_EXTERNAL; - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); // Create a field with settings to validate. $this->fieldStorage = FieldStorageConfig::create([ @@ -779,7 +779,7 @@ protected function doTestEditNonNodeEntityLink() { * Tests <nolink> and <none> as link uri. */ public function testNoLinkUri() { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php index dd56dcebd40097cd422f256c6108afbd69af4059..7f245032154ebb494425123810db567609f6a1d4 100644 --- a/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php +++ b/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php @@ -48,7 +48,7 @@ public function testMediaTypeCreationForm($button_label, $address, $machine_name * Data provider for testMediaTypeCreationForm(). */ public function providerMediaTypeCreationForm() { - $machine_name = mb_strtolower($this->randomMachineName()); + $machine_name = $this->randomMachineName(); return [ [ 'Save', diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php index 4ebe977e505abec619c10875665ab888aaef8509..48c39732027edb1a45b67e6c36990443e86dc2ff 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php @@ -29,7 +29,7 @@ public function testMediaWizard() { $this->createMediaType('test'); - $view_id = strtolower($this->randomMachineName(16)); + $view_id = $this->randomMachineName(16); $this->drupalGet('admin/structure/views/add'); $page->fillField('label', $view_id); $this->waitUntilVisible('.machine-name-value'); @@ -63,7 +63,7 @@ public function testMediaRevisionWizard() { $page = $session->getPage(); $assert_session = $this->assertSession(); - $view_id = strtolower($this->randomMachineName(16)); + $view_id = $this->randomMachineName(16); $this->drupalGet('admin/structure/views/add'); $page->fillField('label', $view_id); $this->waitUntilVisible('.machine-name-value'); diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php index 85aa57bf10ec0da4f720648474033eacbf695360..b82c66567501fea72fb0845edb947845545e1497 100644 --- a/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php +++ b/core/modules/menu_ui/tests/src/Functional/MenuUiLanguageTest.php @@ -61,7 +61,7 @@ protected function setUp(): void { public function testMenuLanguage() { // Create a test menu to test the various language-related settings. // Machine name has to be lowercase. - $menu_name = mb_strtolower($this->randomMachineName(16)); + $menu_name = $this->randomMachineName(16); $label = $this->randomString(); $edit = [ 'id' => $menu_name, diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php index 2d8b3223e74ecd92101eb6626482043dd6b7752c..9cb7d40d03a7f17a2275fe53cba343ae5d8251ba 100644 --- a/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php +++ b/core/modules/menu_ui/tests/src/Functional/MenuUiTest.php @@ -226,7 +226,7 @@ public function testMenuAdministration() { */ public function addCustomMenuCRUD() { // Add a new custom menu. - $menu_name = strtolower($this->randomMachineName(MenuStorage::MAX_ID_LENGTH)); + $menu_name = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH); $label = $this->randomMachineName(16); $menu = Menu::create([ @@ -267,7 +267,7 @@ public function addCustomMenuCRUD() { public function addCustomMenu() { // Try adding a menu using a menu_name that is too long. $this->drupalGet('admin/structure/menu/add'); - $menu_name = strtolower($this->randomMachineName(MenuStorage::MAX_ID_LENGTH + 1)); + $menu_name = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH + 1); $label = $this->randomMachineName(16); $edit = [ 'id' => $menu_name, @@ -282,7 +282,7 @@ public function addCustomMenu() { $this->assertSession()->pageTextContains("Menu name cannot be longer than " . MenuStorage::MAX_ID_LENGTH . " characters but is currently " . mb_strlen($menu_name) . " characters long."); // Change the menu_name so it no longer exceeds the maximum length. - $menu_name = strtolower($this->randomMachineName(MenuStorage::MAX_ID_LENGTH)); + $menu_name = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH); $edit['id'] = $menu_name; $this->drupalGet('admin/structure/menu/add'); $this->submitForm($edit, 'Save'); diff --git a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php index 3eef94fcf7950213d83801d60c544285705ed841..277a67fcff3ad75c49455a444fc394f5d833bf49 100644 --- a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php +++ b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php @@ -75,7 +75,7 @@ public function testBlockContextualLinks() { protected function addCustomMenu() { // Try adding a menu using a menu_name that is too long. $label = $this->randomMachineName(16); - $menu_id = strtolower($this->randomMachineName(MenuStorage::MAX_ID_LENGTH + 1)); + $menu_id = $this->randomMachineName(MenuStorage::MAX_ID_LENGTH + 1); $this->drupalGet('admin/structure/menu/add'); $page = $this->getSession()->getPage(); diff --git a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php index ef53d918ca07d65d8ca524846b4693ef1e22be20..e3091bb80642e3883b49cfbc530c8ca4ef32322b 100644 --- a/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php +++ b/core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php @@ -188,7 +188,7 @@ public function testEntityOwnerValidation() { $normal_user->save(); // Add a "body" field with the text format. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php b/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php index 97c30c9a2116f4f66dfa2930440c8cf7361013f1..ed685ab49061b27b1f96df1c2c2f409a74cd0c8f 100644 --- a/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php +++ b/core/modules/node/tests/src/Functional/MultiStepNodeFormBasicOptionsTest.php @@ -36,7 +36,7 @@ public function testMultiStepNodeFormBasicOptions() { $this->drupalLogin($web_user); // Create an unlimited cardinality field. - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php index 44d9135c4bb79e22ce2e27c514fe7b899c17c5b9..22154a24d8b28be35d89c60e7010034cc8591d26 100644 --- a/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php +++ b/core/modules/node/tests/src/Functional/NodeAccessFieldTest.php @@ -65,7 +65,7 @@ protected function setUp(): void { ]); // Add a custom field to the page content type. - $this->fieldName = mb_strtolower($this->randomMachineName() . '_field_name'); + $this->fieldName = $this->randomMachineName() . '_field_name'; FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php index 049243c41e172d8cf66e8e65dfcf911dc8808c72..ea2bcd9fc29fbe04a275df8513a597e695008716 100644 --- a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php +++ b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php @@ -148,7 +148,7 @@ public function testRecentNodeBlock() { $this->drupalGet("admin/structure/block/add/system_powered_by_block/{$theme}"); $this->assertSession()->pageTextContains('Content type'); $edit = [ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'region' => 'sidebar_first', 'visibility[entity_bundle:node][bundles][article]' => 'article', ]; diff --git a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php index 29164b87b914213bd505582172dbae33fcdedb55..bbab173121b87ec6b288a2efacaa98f9340d979b 100644 --- a/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php +++ b/core/modules/node/tests/src/Functional/NodeTypeTranslationTest.php @@ -103,7 +103,7 @@ protected function installParameters() { * Tests the node type translation. */ public function testNodeTypeTranslation() { - $type = mb_strtolower($this->randomMachineName(16)); + $type = $this->randomMachineName(16); $name = $this->randomString(); $this->drupalLogin($this->adminUser); $this->drupalCreateContentType(['type' => $type, 'name' => $name]); @@ -140,7 +140,7 @@ public function testNodeTypeTranslation() { * Tests the node type title label translation. */ public function testNodeTypeTitleLabelTranslation() { - $type = mb_strtolower($this->randomMachineName(16)); + $type = $this->randomMachineName(16); $name = $this->randomString(); $this->drupalLogin($this->adminUser); $this->drupalCreateContentType(['type' => $type, 'name' => $name]); @@ -176,7 +176,7 @@ public function testNodeTypeTitleLabelTranslation() { $this->submitForm([], 'Save field settings'); $this->submitForm([], 'Save settings'); - $type = mb_strtolower($this->randomMachineName(16)); + $type = $this->randomMachineName(16); $name = $this->randomString(); $this->drupalCreateContentType(['type' => $type, 'name' => $name]); diff --git a/core/modules/node/tests/src/Functional/PagePreviewTest.php b/core/modules/node/tests/src/Functional/PagePreviewTest.php index 9303d6d7c8d49fe0b61c4c3c10d746b53da49733..a3b3f73c2e42a415b7790d4d163f732a368b51c1 100644 --- a/core/modules/node/tests/src/Functional/PagePreviewTest.php +++ b/core/modules/node/tests/src/Functional/PagePreviewTest.php @@ -120,7 +120,7 @@ protected function setUp(): void { $field_config->save(); // Create a field. - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ $vocabulary->id() => $vocabulary->id(), diff --git a/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php b/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php index d528dc39b4f0fb4fbfd45e38e313b28602bed4c4..4949b7c9af5cde00c8759e5a0dd9734a47873ba4 100644 --- a/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php +++ b/core/modules/node/tests/src/Functional/Views/Wizard/HiddenTaxonomyTermReferenceFieldWizardTest.php @@ -37,7 +37,7 @@ public function testHiddenTaxonomyTermReferenceField() { // Create a taxonomy_term_reference field on the article Content Type. By // not assigning a widget to that field we make sure it is hidden on the // Form Display. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php index 17c05412828ae962195a74d308cf42e740aea557..775ee5afe1016d4f1532d6fee1a97aa597e4b77d 100644 --- a/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php +++ b/core/modules/node/tests/src/Functional/Views/Wizard/NodeRevisionWizardTest.php @@ -54,7 +54,7 @@ public function testViewAdd() { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = FALSE; $view['show[type]'] = 'article'; @@ -85,7 +85,7 @@ public function testViewAdd() { $this->submitForm($type, 'Update "Show" choice'); $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = FALSE; $view['show[type]'] = 'all'; diff --git a/core/modules/node/tests/src/Traits/ContentTypeCreationTrait.php b/core/modules/node/tests/src/Traits/ContentTypeCreationTrait.php index 3d8bbe9ac526bb3bf207dd2d56059c81475c882d..127207894e81acb4ef1f00f1d9222dba83f891eb 100644 --- a/core/modules/node/tests/src/Traits/ContentTypeCreationTrait.php +++ b/core/modules/node/tests/src/Traits/ContentTypeCreationTrait.php @@ -27,7 +27,7 @@ protected function createContentType(array $values = []) { // Find a non-existent random type name. if (!isset($values['type'])) { do { - $id = strtolower($this->randomMachineName(8)); + $id = $this->randomMachineName(8); } while (NodeType::load($id)); } else { diff --git a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php index 81f9348d3e1335b70dcafb593d5976ad285c86a2..93bbca1d09405fee3f28742ab2c299de4503e593 100644 --- a/core/modules/options/tests/src/Functional/OptionsFieldUITest.php +++ b/core/modules/options/tests/src/Functional/OptionsFieldUITest.php @@ -80,7 +80,7 @@ protected function setUp(): void { $this->drupalLogin($admin_user); // Create content type, with underscores. - $this->typeName = 'test_' . strtolower($this->randomMachineName()); + $this->typeName = 'test_' . $this->randomMachineName(); $type = $this->drupalCreateContentType(['name' => $this->typeName, 'type' => $this->typeName]); $this->type = $type->id(); } @@ -390,7 +390,7 @@ public function assertAllowedValuesInput(array $input, $result, string $message) * Tests normal and key formatter display on node display. */ public function testNodeDisplay() { - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->createOptionsField('list_integer'); $node = $this->drupalCreateNode(['type' => $this->type]); diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php index c99ee3084a6edb7c3c36322eea2b3018ad5c53f3..a86ad20e203f7c5082c0dd735508cd613e66f2d9 100644 --- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php +++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageFieldDisplayTest.php @@ -189,7 +189,7 @@ protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles = /** @var \Drupal\Core\Render\RendererInterface $renderer */ $renderer = $this->container->get('renderer'); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article', ['uri_scheme' => $scheme]); // Create a new node with an image attached. Make sure we use a large image // so the scale effects of the image styles always have an effect. @@ -385,7 +385,7 @@ public function testResponsiveImageFieldFormattersEmptyMediaQuery() { ]) ->save(); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article', ['uri_scheme' => 'public']); // Create a new node with an image attached. $test_image = current($this->getTestFiles('image')); @@ -460,7 +460,7 @@ public function testResponsiveImageFieldFormattersMultipleSources() { ]) ->save(); $node_storage = $this->container->get('entity_type.manager')->getStorage('node'); - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createImageField($field_name, 'article', ['uri_scheme' => 'public']); // Create a new node with an image attached. $test_image = current($this->getTestFiles('image')); @@ -515,7 +515,7 @@ public function testResponsiveImageFieldFormattersMultipleSources() { * The link type to test. Either 'file' or 'content'. */ private function assertResponsiveImageFieldFormattersLink(string $link_type): void { - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_settings = ['alt_field_required' => 0]; $this->createImageField($field_name, 'article', ['uri_scheme' => 'public'], $field_settings); // Create a new node with an image attached. diff --git a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php index 4409ec2747128f26554d882f0564fe54720fc425..73d77b69532be54a17e3e3cdebe6d6001f52031a 100644 --- a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php +++ b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php @@ -59,7 +59,7 @@ protected function setUp(): void { $this->drupalLogin($admin_user); // Create content type, with underscores. - $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type_name = $this->randomMachineName(8) . '_test'; $type = $this->drupalCreateContentType([ 'name' => $type_name, 'type' => $type_name, diff --git a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php index 451a1acccf2117032442efdb3ceb3b4d5c668fba..8043c8def516717bd2587e96250f9e8de3874558 100644 --- a/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php +++ b/core/modules/search/tests/src/Functional/SearchConfigSettingsFormTest.php @@ -280,8 +280,8 @@ public function testMultipleSearchPages() { $first = []; $first['label'] = $this->randomString(); - $first_id = $first['id'] = strtolower($this->randomMachineName(8)); - $first['path'] = strtolower($this->randomMachineName(8)); + $first_id = $first['id'] = $this->randomMachineName(8); + $first['path'] = $this->randomMachineName(8); $this->submitForm($first, 'Save'); $this->assertDefaultSearch($first_id, 'The default page matches the only search page.'); $this->assertSession()->statusMessageContains("The {$first['label']} search page has been added.", 'status'); @@ -292,7 +292,7 @@ public function testMultipleSearchPages() { $this->submitForm($edit, 'Add search page'); $edit = []; $edit['label'] = $this->randomString(); - $edit['id'] = strtolower($this->randomMachineName(8)); + $edit['id'] = $this->randomMachineName(8); $edit['path'] = $first['path']; $this->submitForm($edit, 'Save'); $this->assertSession()->statusMessageContains('The search page path must be unique.', 'error'); @@ -300,8 +300,8 @@ public function testMultipleSearchPages() { // Add a second search page. $second = []; $second['label'] = $this->randomString(); - $second_id = $second['id'] = strtolower($this->randomMachineName(8)); - $second['path'] = strtolower($this->randomMachineName(8)); + $second_id = $second['id'] = $this->randomMachineName(8); + $second['path'] = $this->randomMachineName(8); $this->submitForm($second, 'Save'); $this->assertDefaultSearch($first_id, 'The default page matches the only search page.'); diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php index c6ed16cfb072d933a98725a7cc95207f91c94694..cd0d8edc1d5c5d3de8bac02b5e98e44c55197a0e 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutLinksTest.php @@ -130,7 +130,7 @@ public function testShortcutLinkAdd() { $this->drupalLogin($this->adminUser); $edit = [ 'label' => $this->randomMachineName(), - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), ]; $this->drupalGet('admin/config/user-interface/shortcut/add-set'); $this->submitForm($edit, 'Save'); diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php index a01efd76f51f6c4ad47a0ccadbc7317cf6f3acd6..0367d8960498705f413e1800ef5c045436710c8d 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutSetsTest.php @@ -40,7 +40,7 @@ public function testShortcutSetAdd() { $this->clickLink('Add shortcut set'); $edit = [ 'label' => $this->randomMachineName(), - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), ]; $this->submitForm($edit, 'Save'); $new_set = $this->container->get('entity_type.manager')->getStorage('shortcut_set')->load($edit['id']); @@ -133,7 +133,7 @@ public function testShortcutSetAssign() { public function testShortcutSetSwitchCreate() { $edit = [ 'set' => 'new', - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->drupalGet('user/' . $this->adminUser->id() . '/shortcuts'); diff --git a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php index 0bd0cd7c6648c346aa4b54ab055d678677f75517..95c0b30de73c4f4072fe839dc11efcebf577b22d 100644 --- a/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php +++ b/core/modules/shortcut/tests/src/Functional/ShortcutTestBase.php @@ -113,7 +113,7 @@ protected function setUp(): void { */ public function generateShortcutSet($label = '', $id = NULL) { $set = ShortcutSet::create([ - 'id' => $id ?? strtolower($this->randomMachineName()), + 'id' => $id ?? $this->randomMachineName(), 'label' => empty($label) ? $this->randomString() : $label, ]); $set->save(); diff --git a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php index 047b92c63feadf6835f1ea98ba14a310547cd48c..8d6bbe7ad61f9a1b07aeaf9a73dedfc9f5737fd9 100644 --- a/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php +++ b/core/modules/system/tests/src/Functional/Module/PrepareUninstallTest.php @@ -186,14 +186,14 @@ public function testUninstall() { $storage = $this->container->get('entity_type.manager') ->getStorage('entity_test_no_label'); $storage->create([ - 'id' => mb_strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'name' => $this->randomMachineName(), ])->save(); $this->drupalGet('admin/modules/uninstall/entity/entity_test_no_label'); $this->assertSession()->pageTextContains('This will delete 1 entity test without label.'); $this->assertSession()->buttonExists("Delete all entity test without label entities"); $storage->create([ - 'id' => mb_strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'name' => $this->randomMachineName(), ])->save(); $this->drupalGet('admin/modules/uninstall/entity/entity_test_no_label'); diff --git a/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php b/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php index 1870b20b86b87a7ea4133b0b3e2f803969a9c14a..c9488fb99b994a2e7048289ccec50935abc14284 100644 --- a/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php +++ b/core/modules/system/tests/src/Functional/System/DateFormatsMachineNameTest.php @@ -63,7 +63,7 @@ public function testDateFormatsMachineNameAllowedValues() { $this->assertSession()->pageTextContains('The machine-readable name is already in use. It must be unique.'); // Create a date format with a machine name distinct from the previous two. - $id = mb_strtolower($this->randomMachineName(16)); + $id = $this->randomMachineName(16); $edit = [ 'label' => $this->randomMachineName(16), 'id' => $id, diff --git a/core/modules/system/tests/src/Functional/System/DateTimeTest.php b/core/modules/system/tests/src/Functional/System/DateTimeTest.php index c96df16d4ffca8710eeee2c4b183f62295eaf38e..d6f62b7878c24c8a56e2d32eade745a8699f8b56 100644 --- a/core/modules/system/tests/src/Functional/System/DateTimeTest.php +++ b/core/modules/system/tests/src/Functional/System/DateTimeTest.php @@ -104,7 +104,7 @@ public function testDateFormatConfiguration() { // Add custom date format. $this->clickLink('Add format'); - $date_format_id = strtolower($this->randomMachineName(8)); + $date_format_id = $this->randomMachineName(8); $name = ucwords($date_format_id); $date_format = 'd.m.Y - H:i'; $edit = [ @@ -156,7 +156,7 @@ public function testDateFormatConfiguration() { $this->assertNull($date_format); // Add a new date format with an existing format. - $date_format_id = strtolower($this->randomMachineName(8)); + $date_format_id = $this->randomMachineName(8); $name = ucwords($date_format_id); $date_format = 'Y'; $edit = [ @@ -186,7 +186,7 @@ public function testDateFormatConfiguration() { $this->assertSession()->assertEscaped("<script>alert('XSS');</script>"); // Add a new date format with HTML in it. - $date_format_id = strtolower($this->randomMachineName(8)); + $date_format_id = $this->randomMachineName(8); $name = ucwords($date_format_id); $date_format = '& \<\e\m\>Y\<\/\e\m\>'; $edit = [ diff --git a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php index 44c79b602a883215358bf62e51ce0e887f7dd599..4b42dfeb73c83d80492f057fb94d6f4b142489ca 100644 --- a/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php +++ b/core/modules/system/tests/src/Kernel/Entity/EntityReferenceSelectionReferenceableTest.php @@ -64,24 +64,24 @@ protected function setUp(): void { // Create a new node-type. NodeType::create([ - 'type' => $node_type = mb_strtolower($this->randomMachineName()), + 'type' => $node_type = $this->randomMachineName(), 'name' => $this->randomString(), ])->save(); // Create an entity reference field targeting 'entity_test_no_label' // entities. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $this->createEntityReferenceField('node', $node_type, $field_name, $this->randomString(), 'entity_test_no_label'); $field_config = FieldConfig::loadByName('node', $node_type, $field_name); $this->selectionHandler = $this->container->get('plugin.manager.entity_reference_selection')->getSelectionHandler($field_config); // Generate a bundle name to be used with 'entity_test_no_label'. - $this->bundle = mb_strtolower($this->randomMachineName()); + $this->bundle = $this->randomMachineName(); // Create 6 entities to be referenced by the field. foreach (static::$labels as $name) { $storage->create([ - 'id' => mb_strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'name' => $name, 'type' => $this->bundle, ])->save(); diff --git a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php index ba3c1aca2920edb186821c45928e44dfc429d91a..38b55075ab584ed9c43464fdf65ee36fb0f59206 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermAutocompleteTest.php @@ -98,7 +98,7 @@ protected function setUp(): void { // Create a taxonomy_term_reference field on the article Content Type that // uses a taxonomy_autocomplete widget. - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); FieldStorageConfig::create([ 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php index c5f7087827c342f5e0665c78ca157bb1700d8416..a28e013e90ef5e38a217b96ce11f95a0d57bb385 100644 --- a/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php +++ b/core/modules/taxonomy/tests/src/Functional/TermIndexTest.php @@ -61,7 +61,7 @@ protected function setUp(): void { // Create a vocabulary and add two term reference fields to article nodes. $this->vocabulary = $this->createVocabulary(); - $this->fieldName1 = mb_strtolower($this->randomMachineName()); + $this->fieldName1 = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ $this->vocabulary->id() => $this->vocabulary->id(), @@ -83,7 +83,7 @@ protected function setUp(): void { ]) ->save(); - $this->fieldName2 = mb_strtolower($this->randomMachineName()); + $this->fieldName2 = $this->randomMachineName(); $this->createEntityReferenceField('node', 'article', $this->fieldName2, NULL, 'taxonomy_term', 'default', $handler_settings, FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $display_repository */ diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php index 90911684263c24e43e7293aa57e78d0b6f82b0d2..ae953f1dd22cf7899fa77a9f9465ef738e254d3e 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyTermViewTest.php @@ -57,7 +57,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void { // Create a vocabulary and add two term reference fields to article nodes. - $this->fieldName1 = mb_strtolower($this->randomMachineName()); + $this->fieldName1 = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php index 1dad37e3bc389a2bfa46b877d4c75af57a98c451..87dea7fa9ff160a2df640bc9af08a054a68b9005 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyLanguageTest.php @@ -50,7 +50,7 @@ public function testVocabularyLanguage() { $this->assertSession()->fieldExists('edit-langcode'); // Create the vocabulary. - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $edit['name'] = $this->randomMachineName(); $edit['description'] = $this->randomMachineName(); $edit['langcode'] = 'aa'; @@ -79,7 +79,7 @@ public function testVocabularyDefaultLanguageForTerms() { // the terms are saved. $edit = [ 'name' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'default_language[langcode]' => 'bb', 'default_language[language_alterable]' => TRUE, ]; diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php index 4eb7cecce8b9cfbaba80ac5ab85eb2f33ffd1aa1..0503216cf6e668982ec35c9adc8f70c13055d0be 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php @@ -61,7 +61,7 @@ public function testVocabularyLanguage() { $this->assertSession()->fieldExists('edit-default-language-content-translation'); // Create the vocabulary. - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $edit['name'] = $this->randomMachineName(); $edit['description'] = $this->randomMachineName(); $edit['langcode'] = 'en'; @@ -81,7 +81,7 @@ public function testVocabularyTitleLabelTranslation(): void { $this->drupalGet('admin/structure/taxonomy/add'); // Create the vocabulary. - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $edit['name'] = $this->randomMachineName(); $edit['description'] = $this->randomMachineName(); $edit['langcode'] = 'en'; diff --git a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php index e4e89cce53674d27f811b8005c8974235fb894af..412ceccde0f99ec405c2b950c3f2b9aec75fb08b 100644 --- a/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php +++ b/core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php @@ -46,7 +46,7 @@ public function testVocabularyInterface() { // Create a new vocabulary. $this->clickLink('Add vocabulary'); $edit = []; - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $edit['name'] = $this->randomMachineName(); $edit['description'] = $this->randomMachineName(); $edit['vid'] = $vid; @@ -157,7 +157,7 @@ public function testTaxonomyAdminNoVocabularies() { */ public function testTaxonomyAdminDeletingVocabulary() { // Create a vocabulary. - $vid = mb_strtolower($this->randomMachineName()); + $vid = $this->randomMachineName(); $edit = [ 'name' => $this->randomMachineName(), 'vid' => $vid, diff --git a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php index 8ff253d18eeb75ec43248cddc2d1729cb00b0ace..ed7c772f2590f5ef9f5015a37003dfcf9e5eece8 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TermHierarchyValidationTest.php @@ -32,7 +32,7 @@ protected function setUp(): void { * Tests the term hierarchy validation with re-parenting in pending revisions. */ public function testTermHierarchyValidation() { - $vocabulary_id = mb_strtolower($this->randomMachineName()); + $vocabulary_id = $this->randomMachineName(); $vocabulary = Vocabulary::create([ 'name' => $vocabulary_id, 'vid' => $vocabulary_id, diff --git a/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php b/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php index e316e2e930aa0ac1b32285cf4ecd4baafc4ef545..52f014b35c9f057d48e0de69a87196f9a7a0b983 100644 --- a/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/VocabularyCrudTest.php @@ -128,7 +128,7 @@ public function testUninstallReinstall() { $vocabulary = $this->createVocabulary(); // Field storages and fields attached to taxonomy term bundles should be // removed when the module is uninstalled. - $field_name = mb_strtolower($this->randomMachineName() . '_field_name'); + $field_name = $this->randomMachineName() . '_field_name'; $storage_definition = [ 'field_name' => $field_name, 'entity_type' => 'taxonomy_term', diff --git a/core/modules/taxonomy/tests/src/Traits/TaxonomyTestTrait.php b/core/modules/taxonomy/tests/src/Traits/TaxonomyTestTrait.php index 60a4b771d11218ab3e8f69f61aafa154a751d82a..4df0f1a293358cecfb4f542a8a0074f3ad1dffaf 100644 --- a/core/modules/taxonomy/tests/src/Traits/TaxonomyTestTrait.php +++ b/core/modules/taxonomy/tests/src/Traits/TaxonomyTestTrait.php @@ -25,7 +25,7 @@ public function createVocabulary(array $values = []) { $values += [ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, 'weight' => mt_rand(0, 10), ]; diff --git a/core/modules/text/tests/src/Functional/TextFieldTest.php b/core/modules/text/tests/src/Functional/TextFieldTest.php index c62a9c8ede15e4a9867fc22f7ee798c736ffd595..292e7d65273d5935ce36fed26170ffb6f96ba3a1 100644 --- a/core/modules/text/tests/src/Functional/TextFieldTest.php +++ b/core/modules/text/tests/src/Functional/TextFieldTest.php @@ -59,7 +59,7 @@ protected function setUp(): void { public function testTextFieldValidation() { // Create a field with settings to validate. $max_length = 3; - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -173,14 +173,14 @@ public function testTextfieldWidgetsAllowedFormats() { // Create one text format. $this->drupalLogin($this->adminUser); $format1 = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => '1_' . $this->randomMachineName(), ]); $format1->save(); // Create a second text format. $format2 = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => '2_' . $this->randomMachineName(), 'filters' => [ 'filter_html' => [ @@ -195,7 +195,7 @@ public function testTextfieldWidgetsAllowedFormats() { // Create a third text format. $format3 = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => '3_' . $this->randomMachineName(), ]); $format3->save(); @@ -210,7 +210,7 @@ public function testTextfieldWidgetsAllowedFormats() { ]); // Create a field with multiple formats allowed. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -307,7 +307,7 @@ public function testTextfieldWidgetsAllowedFormats() { */ public function _testTextfieldWidgetsFormatted($field_type, $widget_type) { // Create a field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -368,7 +368,7 @@ public function _testTextfieldWidgetsFormatted($field_type, $widget_type) { // access to it. $this->drupalLogin($this->adminUser); $edit = [ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => $this->randomMachineName(), ]; $this->drupalGet('admin/config/content/formats/add'); diff --git a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php index 0867f962c95a153be03cdcf0daf68dcf60f6f438..33487b9d60cd61ca6b3c2ae832a581314a02c1e5 100644 --- a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php +++ b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php @@ -107,7 +107,7 @@ public function testTextSummaryRequiredBehavior() { $this->assertSummaryToggle(); // Create a second field with a required summary. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, 'entity_type' => 'node', diff --git a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php index 38b26e38a6f2f2587e52ade23a41c66f3cd61e2f..d3c17673e0ca7d9cdef335e00b514e4d1819ac46 100644 --- a/core/modules/text/tests/src/Kernel/TextItemBaseTest.php +++ b/core/modules/text/tests/src/Kernel/TextItemBaseTest.php @@ -70,7 +70,7 @@ public function testCalculateDependencies() { 'name' => 'Test format', ]); $format->save(); - $fieldName = mb_strtolower($this->randomMachineName()); + $fieldName = $this->randomMachineName(); $field_storage = FieldStorageConfig::create([ 'field_name' => $fieldName, 'entity_type' => 'entity_test', diff --git a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php index a82e53b9e1a4ef8f4510c7d052a9b6c0dcedacab..784222d29919f18f896ceaadbf86653935323062 100644 --- a/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php +++ b/core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php @@ -71,7 +71,7 @@ protected function setUp(): void { ])->save(); // Create new role. - $rid = strtolower($this->randomMachineName(8)); + $rid = $this->randomMachineName(8); $label = $this->randomString(8); $role = Role::create([ 'id' => $rid, diff --git a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php index 8767c92e159601d79daead9d7fad0ba27861c93e..ca618b7f3b51cae7536dc038f72ed7afc93e5411 100644 --- a/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php +++ b/core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php @@ -26,7 +26,7 @@ class UserActionConfigSchemaTest extends KernelTestBase { * Tests whether the user action config schema are valid. */ public function testValidUserActionConfigSchema() { - $rid = strtolower($this->randomMachineName(8)); + $rid = $this->randomMachineName(8); Role::create(['id' => $rid, 'label' => $rid])->save(); // Test user_add_role_action configuration. diff --git a/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php b/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php index 696fc75193fcfd95203e74ba9341ac0431fc175f..8c696100d0233a100bcd4ab3f8cbc9bfbdeb1e5f 100644 --- a/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php +++ b/core/modules/user/tests/src/Kernel/UserEntityReferenceTest.php @@ -37,13 +37,13 @@ protected function setUp(): void { parent::setUp(); $this->role1 = Role::create([ - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'label' => $this->randomMachineName(8), ]); $this->role1->save(); $this->role2 = Role::create([ - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'label' => $this->randomMachineName(8), ]); $this->role2->save(); diff --git a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php index 7fa680f62ed0a8d8b0487861eb3975bba793c29c..024b69c9a21d8bb33c845f5f244e7a52d3a706dd 100644 --- a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php +++ b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php @@ -94,13 +94,13 @@ public function testDependenciesRemoval() { /** @var \Drupal\node\NodeTypeInterface $node_type */ $node_type = NodeType::create([ - 'type' => mb_strtolower($this->randomMachineName()), + 'type' => $this->randomMachineName(), 'name' => $this->randomString(), ]); $node_type->save(); // Create a new text format to be used by role $role. $format = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName()), + 'format' => $this->randomMachineName(), 'name' => $this->randomString(), ]); $format->save(); diff --git a/core/modules/user/tests/src/Traits/UserCreationTrait.php b/core/modules/user/tests/src/Traits/UserCreationTrait.php index 753e5c38a4a37731a89375196c0d4863f2451025..85cde09eb17bd845402e679935a61920c4c04a3f 100644 --- a/core/modules/user/tests/src/Traits/UserCreationTrait.php +++ b/core/modules/user/tests/src/Traits/UserCreationTrait.php @@ -239,7 +239,7 @@ protected function createAdminRole($rid = NULL, $name = NULL, $weight = NULL) { protected function createRole(array $permissions, $rid = NULL, $name = NULL, $weight = NULL) { // Generate a random, lowercase machine name if none was passed. if (!isset($rid)) { - $rid = strtolower($this->randomMachineName(8)); + $rid = $this->randomMachineName(8); } // Generate a random label. if (!isset($name)) { diff --git a/core/modules/views/tests/src/Functional/DefaultViewsTest.php b/core/modules/views/tests/src/Functional/DefaultViewsTest.php index 4717b3f24f597ac93aba0e2fcad660544739fd41..d97f3256d54e48baeecabcc9ec1b418293cdcdc4 100644 --- a/core/modules/views/tests/src/Functional/DefaultViewsTest.php +++ b/core/modules/views/tests/src/Functional/DefaultViewsTest.php @@ -70,7 +70,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void { $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, 'help' => '', 'nodes' => ['page' => 'page'], @@ -79,7 +79,7 @@ protected function setUp($import_test_views = TRUE, $modules = []): void { $vocabulary->save(); // Create a field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php index aa22353f1ed59c1a2f2fbb1bf46dae8b16c42a6b..e49fda6d79ed61a327d4e880cbc9d296d5ae3574 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormCheckboxesTest.php @@ -127,7 +127,7 @@ public function testExposedIsAllOfFilter() { } // Create a field. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ $this->vocabulary->id() => $this->vocabulary->id(), diff --git a/core/modules/views/tests/src/Functional/Wizard/BasicTest.php b/core/modules/views/tests/src/Functional/Wizard/BasicTest.php index 61921c0c1681752e1c58ffad17d31f1a5b8f5d9a..120c4bcba1d616d936f77b4c8c9776372dd8b373 100644 --- a/core/modules/views/tests/src/Functional/Wizard/BasicTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/BasicTest.php @@ -38,7 +38,7 @@ public function testViewsWizardAndListing() { // Create a simple and not at all useful view. $view1 = []; $view1['label'] = $this->randomMachineName(16); - $view1['id'] = strtolower($this->randomMachineName(16)); + $view1['id'] = $this->randomMachineName(16); $view1['description'] = $this->randomMachineName(16); $view1['page[create]'] = FALSE; $this->drupalGet('admin/structure/views/add'); @@ -65,7 +65,7 @@ public function testViewsWizardAndListing() { // Now create a page with simple node listing and an attached feed. $view2 = []; $view2['label'] = $this->randomMachineName(16); - $view2['id'] = strtolower($this->randomMachineName(16)); + $view2['id'] = $this->randomMachineName(16); $view2['description'] = $this->randomMachineName(16); $view2['page[create]'] = 1; $view2['page[title]'] = $this->randomMachineName(16); @@ -115,7 +115,7 @@ public function testViewsWizardAndListing() { // Create a view with a page and a block, and filter the listing. $view3 = []; $view3['label'] = $this->randomMachineName(16); - $view3['id'] = strtolower($this->randomMachineName(16)); + $view3['id'] = $this->randomMachineName(16); $view3['description'] = $this->randomMachineName(16); $view3['show[wizard_key]'] = 'node'; $view3['show[type]'] = 'page'; @@ -161,7 +161,7 @@ public function testViewsWizardAndListing() { // Create a view with only a REST export. $view4 = []; $view4['label'] = $this->randomMachineName(16); - $view4['id'] = strtolower($this->randomMachineName(16)); + $view4['id'] = $this->randomMachineName(16); $view4['description'] = $this->randomMachineName(16); $view4['show[wizard_key]'] = 'node'; $view4['show[type]'] = 'page'; @@ -184,7 +184,7 @@ public function testViewsWizardAndListing() { // set. $leading_slash_view = []; $leading_slash_view['label'] = $this->randomMachineName(16); - $leading_slash_view['id'] = strtolower($this->randomMachineName(16)); + $leading_slash_view['id'] = $this->randomMachineName(16); $leading_slash_view['description'] = $this->randomMachineName(16); $leading_slash_view['show[wizard_key]'] = 'node'; $leading_slash_view['show[type]'] = 'page'; @@ -202,7 +202,7 @@ public function testViewsWizardAndListing() { * @see \Drupal\views\Plugin\views\display\DisplayPluginBase::mergeDefaults() */ public function testWizardDefaultValues() { - $random_id = strtolower($this->randomMachineName(16)); + $random_id = $this->randomMachineName(16); // Create a basic view. $view = []; $view['label'] = $this->randomMachineName(16); diff --git a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php index b0327bf2fba111b5425618b997ad0e294058177d..52de147919a8071b4686eabf3fcc044d106e1cf8 100644 --- a/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/EntityTestRevisionTest.php @@ -30,7 +30,7 @@ public function testRevisionsViewWithNoTypeOnBaseTable() { $this->submitForm($type, 'Update "Show" choice'); $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = FALSE; $view['show[type]'] = 'entity_test_rev'; diff --git a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php index 61da043cf2dfa1d86fb2be35ebc6627cd4b04f1f..67d3c38db83aaba08fc14f1dcb902dba639e5135 100644 --- a/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php @@ -44,7 +44,7 @@ public function testItemsPerPage() { // 3 in the block. $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['show[wizard_key]'] = 'node'; $view['show[type]'] = 'article'; diff --git a/core/modules/views/tests/src/Functional/Wizard/MenuTest.php b/core/modules/views/tests/src/Functional/Wizard/MenuTest.php index 616a12519ec66b44bb8c54cfafd723ba58550ada..74fc7dc212e8811379d5752d63e6ec575427a42d 100644 --- a/core/modules/views/tests/src/Functional/Wizard/MenuTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/MenuTest.php @@ -26,7 +26,7 @@ public function testMenus() { // Create a view with a page display and a menu link in the Main Menu. $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[title]'] = $this->randomMachineName(16); diff --git a/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php b/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php index bc2b2352f0c1fd4cc19308c56679cf07c9a9b14b..27924889afd75c2b62b2286d2e88d7c383702292 100644 --- a/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/NodeWizardTest.php @@ -23,7 +23,7 @@ public function testViewAddWithNodeTitles() { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = FALSE; $view['show[wizard_key]'] = 'node'; diff --git a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php index fb99faa53a8f06d7828d3c1f010f5e63ded1e0e9..a3a3e34246c40b2d1769cee5c4dff865fd678426 100644 --- a/core/modules/views/tests/src/Functional/Wizard/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/PagerTest.php @@ -52,7 +52,7 @@ public function testPager() { protected function createViewAtPath($path, $pager = TRUE) { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['show[sort]'] = 'node_field_data-created:ASC'; $view['page[create]'] = 1; $view['page[title]'] = $this->randomMachineName(16); diff --git a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php index 52d8f96c246408cec97e23a95856a35aab1b1587..aa75f24139b380cff0e29f65b3cbdad4d4cda028 100644 --- a/core/modules/views/tests/src/Functional/Wizard/SortingTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/SortingTest.php @@ -37,7 +37,7 @@ public function testSorting() { // Create a view that sorts oldest first. $view1 = []; $view1['label'] = $this->randomMachineName(16); - $view1['id'] = strtolower($this->randomMachineName(16)); + $view1['id'] = $this->randomMachineName(16); $view1['description'] = $this->randomMachineName(16); $view1['show[sort]'] = 'node_field_data-created:ASC'; $view1['page[create]'] = 1; @@ -64,7 +64,7 @@ public function testSorting() { // Create a view that sorts newest first. $view2 = []; $view2['label'] = $this->randomMachineName(16); - $view2['id'] = strtolower($this->randomMachineName(16)); + $view2['id'] = $this->randomMachineName(16); $view2['description'] = $this->randomMachineName(16); $view2['show[sort]'] = 'node_field_data-created:DESC'; $view2['page[create]'] = 1; diff --git a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php index ffcdf1f49f0e9bd68e920674de2177941080fadb..0319ef2d66a0ebe1da9c43fa496fe9962b5f3a86 100644 --- a/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php +++ b/core/modules/views/tests/src/Functional/Wizard/TaggedWithTest.php @@ -156,7 +156,7 @@ public function testTaggedWith() { $this->submitForm($view1, 'Update "of type" choice'); // Now resubmit the entire form to the same URL. $view1['label'] = $this->randomMachineName(16); - $view1['id'] = strtolower($this->randomMachineName(16)); + $view1['id'] = $this->randomMachineName(16); $view1['description'] = $this->randomMachineName(16); $view1['show[tagged_with]'] = 'tag1'; $view1['page[create]'] = 1; @@ -179,7 +179,7 @@ public function testTaggedWith() { $this->submitForm($view2, 'Update "of type" choice'); $this->assertSession()->statusCodeEquals(200); $view2['label'] = $this->randomMachineName(16); - $view2['id'] = strtolower($this->randomMachineName(16)); + $view2['id'] = $this->randomMachineName(16); $view2['description'] = $this->randomMachineName(16); $view2['show[tagged_with]'] = 'tag2'; $view2['page[create]'] = 1; diff --git a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php index dd248e217447ce397305674639347869f9828c73..5e0a81ee3a442fd98866743342480f7f10de822d 100644 --- a/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php @@ -62,7 +62,7 @@ protected function setUp($import_test_views = TRUE): void { ]); $content_type->save(); $field_storage = FieldStorageConfig::create([ - 'field_name' => mb_strtolower($this->randomMachineName()), + 'field_name' => $this->randomMachineName(), 'entity_type' => 'node', 'type' => 'comment', ]); diff --git a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php index d3930d35c0f85a663c872978049b4765b3aceec4..713981a19fa06784e5deb6e666299a227ab059e8 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/BlockDependenciesTest.php @@ -94,7 +94,7 @@ protected function createBlock($plugin_id, array $settings = []) { $settings += [ 'plugin' => $plugin_id, 'region' => 'sidebar_first', - 'id' => strtolower($this->randomMachineName(8)), + 'id' => $this->randomMachineName(8), 'theme' => $this->config('system.theme')->get('default'), 'label' => $this->randomMachineName(8), 'visibility' => [], diff --git a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php index 81c596e062478c7075c39468bc87b65e29e13d07..21d09d521930401b5fd8082b3764524ad6762d03 100644 --- a/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php +++ b/core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php @@ -49,7 +49,7 @@ public function testCreateView() { $form = []; $form_state = new FormState(); $form = $this->wizard->buildForm($form, $form_state); - $random_id = strtolower($this->randomMachineName()); + $random_id = $this->randomMachineName(); $random_label = $this->randomMachineName(); $random_description = $this->randomMachineName(); diff --git a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php index 7d13dbbc83e601ec530f7ddcc6d80044821f9f8a..af2b56863e050487704cdf400f4ee98e1706fd5c 100644 --- a/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php +++ b/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php @@ -107,7 +107,7 @@ public function testDefaultViews() { // Duplicate a view and set a custom name. $this->drupalGet('admin/structure/views'); $this->clickViewsOperationLink('Duplicate', '/glossary'); - $random_name = strtolower($this->randomMachineName()); + $random_name = $this->randomMachineName(); $this->submitForm(['id' => $random_name], 'Duplicate'); $this->assertSession()->addressEquals("admin/structure/views/view/$random_name"); diff --git a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php index eee32d0c75745dd0adb09a3dfeea8a38342cc87a..43c7f212143fe5133d2feed738dbd033ba06f4c0 100644 --- a/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php +++ b/core/modules/views_ui/tests/src/Functional/DisplayPathTest.php @@ -238,7 +238,7 @@ public function testDefaultMenuTabRegression() { $edit = []; $edit['label'] = $this->randomMachineName(16); - $view_id = $edit['id'] = strtolower($this->randomMachineName(16)); + $view_id = $edit['id'] = $this->randomMachineName(16); $edit['description'] = $this->randomMachineName(16); $edit['page[create]'] = TRUE; $edit['page[path]'] = 'admin/foo'; diff --git a/core/modules/views_ui/tests/src/Functional/DuplicateTest.php b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php index 1b17ab4a13581228b8897dcc67312d0d17c054bc..bdddf15b0fc85028d7a875ebed5c913470f3549e 100644 --- a/core/modules/views_ui/tests/src/Functional/DuplicateTest.php +++ b/core/modules/views_ui/tests/src/Functional/DuplicateTest.php @@ -36,7 +36,7 @@ public function testDuplicateView() { // Generate random label and id for new view. $view['label'] = $this->randomMachineName(255); - $view['id'] = strtolower($this->randomMachineName(128)); + $view['id'] = $this->randomMachineName(128); // Duplicate view. $this->drupalGet('admin/structure/views/view/' . $random_view['id'] . '/duplicate'); diff --git a/core/modules/views_ui/tests/src/Functional/FieldUITest.php b/core/modules/views_ui/tests/src/Functional/FieldUITest.php index 02a309048d4402d3feb234453892abf3ff9fc062..283994202d2a35cde483e20405c2bd37c53ae53a 100644 --- a/core/modules/views_ui/tests/src/Functional/FieldUITest.php +++ b/core/modules/views_ui/tests/src/Functional/FieldUITest.php @@ -87,7 +87,7 @@ public function testFieldLabel() { // labels by default. $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['show[wizard_key]'] = 'node'; $view['page[create]'] = TRUE; diff --git a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php index 535afb26259cbab6d9e36efea092155d9b9b97a4..00923356db316177fb350503abe3174dd1197f7c 100644 --- a/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php +++ b/core/modules/views_ui/tests/src/Functional/NewViewConfigSchemaTest.php @@ -48,7 +48,7 @@ public function testNewViews() { foreach ($wizards as $wizard_key) { $edit = []; $edit['label'] = $this->randomString(); - $edit['id'] = strtolower($this->randomMachineName()); + $edit['id'] = $this->randomMachineName(); $edit['show[wizard_key]'] = $wizard_key; $edit['description'] = $this->randomString(); $this->drupalGet('admin/structure/views/add'); diff --git a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php index 1c030b5cdcde039aefb873cb369c4d0cb7e3a73c..2dac1a7d1c2a9d405243569eac00178d71a8a475 100644 --- a/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php +++ b/core/modules/views_ui/tests/src/Functional/OverrideDisplaysTest.php @@ -30,7 +30,7 @@ public function testOverrideDisplays() { // Create a basic view that shows all content, with a page and a block // display. $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[path]'] = $this->randomMachineName(16); $view['block[create]'] = 1; @@ -96,7 +96,7 @@ public function testWizardMixedDefaultOverriddenDisplays() { // page and feed to inherit their titles from the default display, but the // block to override it. $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[title]'] = $this->randomMachineName(16); $view['page[path]'] = $this->randomMachineName(16); @@ -195,7 +195,7 @@ public function testRevertAllDisplays() { // Because there is both a title on page and block we expect the title on // the block be overridden. $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[title]'] = $this->randomMachineName(16); $view['page[path]'] = $this->randomMachineName(16); diff --git a/core/modules/views_ui/tests/src/Functional/PreviewTest.php b/core/modules/views_ui/tests/src/Functional/PreviewTest.php index 7dc135a9be1d4ebfcf2678679da377539aadfdd2..c8c6728df3562968f8c90f4608bec0c704657512 100644 --- a/core/modules/views_ui/tests/src/Functional/PreviewTest.php +++ b/core/modules/views_ui/tests/src/Functional/PreviewTest.php @@ -91,7 +91,7 @@ public function testPreviewUI() { // Test feed preview. $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[title]'] = $this->randomMachineName(16); $view['page[path]'] = $this->randomMachineName(16); diff --git a/core/modules/views_ui/tests/src/Functional/SettingsTest.php b/core/modules/views_ui/tests/src/Functional/SettingsTest.php index c04475bd6ae50445d11c82daf3a8e7c776d3706e..7535c380db81dbd2d45540a65bb9aa1986aefee7 100644 --- a/core/modules/views_ui/tests/src/Functional/SettingsTest.php +++ b/core/modules/views_ui/tests/src/Functional/SettingsTest.php @@ -55,7 +55,7 @@ public function testEditUI() { $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['description'] = $this->randomMachineName(16); $view['page[create]'] = TRUE; $view['page[title]'] = $this->randomMachineName(16); @@ -78,7 +78,7 @@ public function testEditUI() { // Create a view with an additional display, so default should be hidden. $view['page[create]'] = TRUE; - $view['id'] = strtolower($this->randomMachineName()); + $view['id'] = $this->randomMachineName(); $this->drupalGet('admin/structure/views/add'); $this->submitForm($view, 'Save and edit'); @@ -94,7 +94,7 @@ public function testEditUI() { $this->drupalGet('admin/structure/views/settings'); $this->submitForm($edit, 'Save configuration'); - $view['id'] = strtolower($this->randomMachineName()); + $view['id'] = $this->randomMachineName(); $this->drupalGet('admin/structure/views/add'); $this->submitForm($view, 'Save and edit'); $this->assertSession()->buttonExists('edit-displays-top-add-display-embed'); @@ -116,7 +116,7 @@ public function testEditUI() { $this->drupalGet('admin/structure/views/settings'); $this->submitForm($edit, 'Save configuration'); - $view['id'] = strtolower($this->randomMachineName()); + $view['id'] = $this->randomMachineName(); $this->drupalGet('admin/structure/views/add'); $this->submitForm($view, 'Save and edit'); @@ -130,7 +130,7 @@ public function testEditUI() { $this->drupalGet('admin/structure/views/settings'); $this->submitForm($edit, 'Save configuration'); - $view['id'] = strtolower($this->randomMachineName()); + $view['id'] = $this->randomMachineName(); $this->drupalGet('admin/structure/views/add'); $this->submitForm($view, 'Save and edit'); diff --git a/core/modules/views_ui/tests/src/Functional/StyleTableTest.php b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php index b2ecd1d286ad31209163c4bfbfc02c751583f06a..456ec51821d33df05ec00912043863a15175e8ed 100644 --- a/core/modules/views_ui/tests/src/Functional/StyleTableTest.php +++ b/core/modules/views_ui/tests/src/Functional/StyleTableTest.php @@ -24,7 +24,7 @@ public function testWizard() { // Create a new view and check that the first field has a label. $view = []; $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['show[wizard_key]'] = 'node'; $view['page[create]'] = TRUE; $view['page[style][style_plugin]'] = 'table'; diff --git a/core/modules/views_ui/tests/src/Functional/UITestBase.php b/core/modules/views_ui/tests/src/Functional/UITestBase.php index deb140595b8a7491fde1bfe0995b630f60fec166..ef4aae78065bd9659a2d22ea3ae0df0eadb27b88 100644 --- a/core/modules/views_ui/tests/src/Functional/UITestBase.php +++ b/core/modules/views_ui/tests/src/Functional/UITestBase.php @@ -57,7 +57,7 @@ public function randomView(array $view = []) { // Create a new view in the UI. $default = []; $default['label'] = $this->randomMachineName(16); - $default['id'] = strtolower($this->randomMachineName(16)); + $default['id'] = $this->randomMachineName(16); $default['description'] = $this->randomMachineName(16); $default['page[create]'] = TRUE; $default['page[path]'] = $default['id']; diff --git a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php index c28580b32cbf2e992a345554288e51994ed6008d..eea297a2b71ec86aa1aa74f438c1d505a931d732 100644 --- a/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php +++ b/core/modules/views_ui/tests/src/Functional/ViewsUITourTest.php @@ -57,7 +57,7 @@ public function testViewsUiTourTips() { // Create a basic view that shows all content, with a page and a block // display. $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[path]'] = $this->randomMachineName(16); $this->drupalGet('admin/structure/views/add'); @@ -97,7 +97,7 @@ public function testViewsUiTourTipsTranslated() { // Create a basic view that shows all content, with a page and a block // display. $view['label'] = $this->randomMachineName(16); - $view['id'] = strtolower($this->randomMachineName(16)); + $view['id'] = $this->randomMachineName(16); $view['page[create]'] = 1; $view['page[path]'] = $this->randomMachineName(16); // Load the page in dutch. diff --git a/core/modules/views_ui/tests/src/Functional/WizardTest.php b/core/modules/views_ui/tests/src/Functional/WizardTest.php index 55f1967bafdcd28bd32ee978f7c7ebf403000351..81718fd21c46981892362bf7da95ac1ec3616a79 100644 --- a/core/modules/views_ui/tests/src/Functional/WizardTest.php +++ b/core/modules/views_ui/tests/src/Functional/WizardTest.php @@ -25,7 +25,7 @@ class WizardTest extends WizardTestBase { public function testWizardFieldLength() { $view = []; $view['label'] = $this->randomMachineName(256); - $view['id'] = strtolower($this->randomMachineName(129)); + $view['id'] = $this->randomMachineName(129); $view['page[create]'] = TRUE; $view['page[path]'] = $this->randomMachineName(255); $view['page[title]'] = $this->randomMachineName(256); @@ -48,7 +48,7 @@ public function testWizardFieldLength() { $this->assertSession()->pageTextContains('REST export path cannot be longer than 254 characters but is currently 255 characters long.'); $view['label'] = $this->randomMachineName(255); - $view['id'] = strtolower($this->randomMachineName(128)); + $view['id'] = $this->randomMachineName(128); $view['page[create]'] = TRUE; $view['page[path]'] = $this->randomMachineName(254); $view['page[title]'] = $this->randomMachineName(255); diff --git a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php index 4e9d012bf0ca75d09d4f802fcc7b5761a25fdd86..f8080e8f76a9dd2a9f418253aeb6d36baabf1c07 100644 --- a/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php +++ b/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php @@ -226,7 +226,7 @@ public function testWorkspaceFieldUi() { $this->assertSession()->statusCodeEquals(200); // Create a new filed. - $field_name = mb_strtolower($this->randomMachineName()); + $field_name = $this->randomMachineName(); $field_label = $this->randomMachineName(); $this->fieldUIAddNewField('admin/config/workflow/workspaces', $field_name, $field_label, 'string'); diff --git a/core/modules/workspaces/tests/src/Kernel/WorkspaceViewsKernelTest.php b/core/modules/workspaces/tests/src/Kernel/WorkspaceViewsKernelTest.php index b34a23661d0be592d53e9d3e899d7927ae1bc92d..8cc6f175580004ac35127e005d22e0eea8f7cbc0 100644 --- a/core/modules/workspaces/tests/src/Kernel/WorkspaceViewsKernelTest.php +++ b/core/modules/workspaces/tests/src/Kernel/WorkspaceViewsKernelTest.php @@ -32,7 +32,7 @@ public function testCreateWorkspaceView() { $form = []; $form_state = new FormState(); $form = $wizard->buildForm($form, $form_state); - $random_id = strtolower($this->randomMachineName()); + $random_id = $this->randomMachineName(); $random_label = $this->randomMachineName(); $form_state->setValues([ diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php index 044b9eb4ae1abb82b21dff6c79db25f9503bcded..61c9d2e2f69832cfb8ad10cd415518aa8ea035a1 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityStatusTest.php @@ -23,7 +23,7 @@ class ConfigEntityStatusTest extends KernelTestBase { */ public function testCRUD() { $entity = \Drupal::entityTypeManager()->getStorage('config_test')->create([ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), ]); $this->assertTrue($entity->status(), 'Default status is enabled.'); $entity->save(); diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php index aeed2a6737cead4bc17a08459d676c1e70569f77..1f3c8928f8fb984fee8f799ca5414f714aa428e6 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php @@ -154,7 +154,7 @@ public function testMachineNameLength(): void { $id_key = $this->entity->getEntityType()->getKey('id'); $this->entity->set( $id_key, - mb_strtolower($this->randomMachineName($max_length + 2)) + $this->randomMachineName($max_length + 2) ); $this->assertValidationErrors([ $id_key => 'This value is too long. It should have <em class="placeholder">' . $max_length . '</em> characters or less.', diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php index c65a9004b8ce0ac6cf3bc565348d5ee7a7130aa1..c26c80c1d58f7c68f5414230990cd72dfada67b3 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRecreateTest.php @@ -60,7 +60,7 @@ protected function setUp(): void { } public function testRecreateEntity() { - $type_name = mb_strtolower($this->randomMachineName(16)); + $type_name = $this->randomMachineName(16); $content_type = NodeType::create([ 'type' => $type_name, 'name' => 'Node type one', diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php index 5dffd1c93d6487617e07348409fbf27339e8d992..72ed6cda2bf8328077fc033441cd3411e95b0f01 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImportRenameValidationTest.php @@ -89,7 +89,7 @@ public function testRenameValidation() { // Create a content type with a matching UUID in the active storage. $content_type = NodeType::create([ - 'type' => mb_strtolower($this->randomMachineName(16)), + 'type' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), 'uuid' => $uuid, ]); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php index 6066118ff77f3fc7d4e82606d0fc4b3ad94ac38e..0668c8ac190fa04b4c9fdb5a99291a9023e25e93 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php @@ -66,10 +66,10 @@ protected function setUp(): void { $this->state->set('entity_test.translation', TRUE); // Create a translatable test field. - $this->fieldName = mb_strtolower($this->randomMachineName() . '_field_name'); + $this->fieldName = $this->randomMachineName() . '_field_name'; // Create an untranslatable test field. - $this->untranslatableFieldName = mb_strtolower($this->randomMachineName() . '_field_name'); + $this->untranslatableFieldName = $this->randomMachineName() . '_field_name'; // Create field fields in all entity variations. foreach (entity_test_entity_types() as $entity_type) { diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php index 036c453186c19bf51ef24120ccad94c6c9df2a5f..84de113342e6b0a47193c480e184849d0b360bae 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php @@ -70,13 +70,13 @@ protected function setUp(): void { // We want an entity reference field. It needs a vocabulary, terms, a field // storage and a field. First, create the vocabulary. $vocabulary = Vocabulary::create([ - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), ]); $vocabulary->save(); // Second, create the field. entity_test_create_bundle('test_bundle'); - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $handler_settings = [ 'target_bundles' => [ $vocabulary->id() => $vocabulary->id(), diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php index 66d650fad00c879cf5685be2e92c1f85d7f9600b..95d8c6a8eddd83c40f8c64ec16049c226c8d76a8 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php @@ -73,8 +73,8 @@ protected function setUp(): void { $this->installConfig(['language']); - $figures = mb_strtolower($this->randomMachineName()); - $greetings = mb_strtolower($this->randomMachineName()); + $figures = $this->randomMachineName(); + $greetings = $this->randomMachineName(); foreach ([$figures => 'shape', $greetings => 'text'] as $field_name => $field_type) { $field_storage = FieldStorageConfig::create([ 'field_name' => $field_name, diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php index 6d3ac67e9178493188502b1729ad6a47d4209c08..3c938e5db30af8e3e2501c11f06c52115ac56649 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php @@ -80,7 +80,7 @@ protected function setUp(): void { $this->installEntitySchema('entity_test_rev'); $entity_type = 'entity_test_rev'; - $this->fieldName = strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->fieldCardinality = 4; $this->fieldStorage = FieldStorageConfig::create([ 'field_name' => $this->fieldName, @@ -283,7 +283,7 @@ public function testLongNames() { $storage = $this->container->get('entity_type.manager')->getStorage($entity_type); // Create two fields and generate random values. - $name_base = mb_strtolower($this->randomMachineName(FieldStorageConfig::NAME_MAX_LENGTH - 1)); + $name_base = $this->randomMachineName(FieldStorageConfig::NAME_MAX_LENGTH - 1); $field_names = []; $values = []; for ($i = 0; $i < 2; $i++) { diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php index 7eb64d6f3808e2bf7d20bc85c788386b961383b3..3ce62f243d0d036f5a596a4eb035bebeadb31e4d 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php @@ -32,7 +32,7 @@ protected function setUp(): void { $entity_type_id = 'entity_test_mulrev'; $this->installEntitySchema($entity_type_id); - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ FieldStorageConfig::create([ diff --git a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php index f6550027f38cfef0eb256cebbb0091d6aa0446ea..5a725bed81a3139942179b7568223e6def176ba2 100644 --- a/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php +++ b/core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php @@ -37,7 +37,7 @@ protected function setUp(): void { $entity_type_id = 'entity_test_mulrev'; $this->installEntitySchema($entity_type_id); - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ FieldStorageConfig::create([ diff --git a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php index 3a651d0a88bc4e006cdd47f12a25a1b44c46dfe4..8b51ed22c32d8bb0d103d1c88e59dd00ba994bcc 100644 --- a/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php @@ -505,7 +505,7 @@ public function testLifecycleLink($lifecycle, $lifecycle_link = NULL, $exception vfsStream::setup('modules'); // Use a random file name to bypass the static caching in // \Drupal\Core\Extension\InfoParser. - $random = mb_strtolower($this->randomMachineName()); + $random = $this->randomMachineName(); $filename = "lifecycle-$random.info.yml"; vfsStream::create([ 'fixtures' => [