diff --git a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php index cb4030792272..925544415d5f 100644 --- a/core/modules/block/tests/src/Functional/BlockHookOperationTest.php +++ b/core/modules/block/tests/src/Functional/BlockHookOperationTest.php @@ -44,7 +44,7 @@ class BlockHookOperationTest extends BrowserTestBase { 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 95c2b3fa4df0..cd558073852b 100644 --- a/core/modules/block/tests/src/Functional/BlockLanguageTest.php +++ b/core/modules/block/tests/src/Functional/BlockLanguageTest.php @@ -79,7 +79,7 @@ class BlockLanguageTest extends BrowserTestBase { // 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 @@ class BlockLanguageTest extends BrowserTestBase { $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 4fc188a85e3a..e626f7e7f9fa 100644 --- a/core/modules/block/tests/src/Functional/BlockTest.php +++ b/core/modules/block/tests/src/Functional/BlockTest.php @@ -30,7 +30,7 @@ class BlockTest extends BlockTestBase { // 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 @@ class BlockTest extends BlockTestBase { // 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 @@ class BlockTest extends BlockTestBase { // 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 @@ class BlockTest extends BlockTestBase { // 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 @@ class BlockTest extends BlockTestBase { $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 @@ class BlockTest extends BlockTestBase { $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 882fadb9b039..28a4c476db9b 100644 --- a/core/modules/block/tests/src/Functional/BlockUiTest.php +++ b/core/modules/block/tests/src/Functional/BlockUiTest.php @@ -317,7 +317,7 @@ class BlockUiTest extends BrowserTestBase { // 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 55f54f822d49..043474f07252 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 @@ class DisplayBlockTest extends ViewTestBase { // 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 1f576125af39..7b61ab6f7077 100644 --- a/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php +++ b/core/modules/block/tests/src/Kernel/BlockConfigSchemaTest.php @@ -65,7 +65,7 @@ class BlockConfigSchemaTest extends KernelTestBase { */ 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 b2f099a49cad..06bf3544e4db 100644 --- a/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php +++ b/core/modules/block/tests/src/Kernel/NewDefaultThemeBlocksTest.php @@ -35,15 +35,15 @@ class NewDefaultThemeBlocksTest extends KernelTestBase { // 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 fe1bc3c92211..440f34c10da8 100644 --- a/core/modules/block/tests/src/Traits/BlockCreationTrait.php +++ b/core/modules/block/tests/src/Traits/BlockCreationTrait.php @@ -43,7 +43,7 @@ trait BlockCreationTrait { $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 c719e4a37821..17e5a223472e 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 @@ abstract class BlockContentTestBase extends BrowserTestBase { 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 ae69ff101519..98d302dbc14b 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 @@ class BlockContentTranslationUITest extends ContentTranslationUITestBase { * {@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 f2ae75d02c19..b45452b03dcf 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 @@ class PageEditTest extends BlockContentTestBase { $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 b9222d93bb55..3482f7923c9a 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 @@ abstract class BlockContentTestBase extends ViewTestBase { // 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 e68923b34237..de68b2aeb291 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 @@ class BlockContentWizardTest extends BlockContentTestBase { 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 a68452a13bfc..ec5e319168dd 100644 --- a/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php +++ b/core/modules/comment/tests/src/Functional/CommentInterfaceTest.php @@ -309,7 +309,7 @@ class CommentInterfaceTest extends CommentTestBase { $this->assertSession()->responseContains('
' . $comment_text . '
'); // 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 c8b206134503..5252f833050a 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 @@ class WizardTest extends WizardTestBase { 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 @@ class WizardTest extends WizardTestBase { } $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 c098c0ccf35f..9e48bcd1e53b 100644 --- a/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php +++ b/core/modules/comment/tests/src/Kernel/CommentIntegrationTest.php @@ -58,7 +58,7 @@ class CommentIntegrationTest extends KernelTestBase { * @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 @@ class CommentIntegrationTest extends KernelTestBase { 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 e58aaa9a984d..b2bb975cce84 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityStatusUITest.php @@ -31,7 +31,7 @@ class ConfigEntityStatusUITest extends BrowserTestBase { '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 f2aff9521bb0..7f7c5e534f2a 100644 --- a/core/modules/config/tests/src/Functional/ConfigEntityTest.php +++ b/core/modules/config/tests/src/Functional/ConfigEntityTest.php @@ -230,7 +230,7 @@ class ConfigEntityTest extends BrowserTestBase { 'administer site configuration', ])); - $id = strtolower($this->randomMachineName()); + $id = $this->randomMachineName(); $label1 = $this->randomMachineName(); $label2 = $this->randomMachineName(); $label3 = $this->randomMachineName(); @@ -290,7 +290,7 @@ class ConfigEntityTest extends BrowserTestBase { // 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 @@ class ConfigEntityTest extends BrowserTestBase { // @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 fa01655f679e..ee7ba633b644 100644 --- a/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php +++ b/core/modules/config/tests/src/Functional/ConfigExportImportUITest.php @@ -106,7 +106,7 @@ class ConfigExportImportUITest extends BrowserTestBase { $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 182b36595594..440fa2f7f503 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 @@ class ConfigTranslationCacheTest extends BrowserTestBase { 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 @@ class ConfigTranslationCacheTest extends BrowserTestBase { $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 657ba9486e51..f7d921ff4af9 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 @@ class ConfigTranslationListUiTest extends BrowserTestBase { protected function doBlockListTest() { // Add a test block, any block will do. // Set the machine name so the translate link can be built later. - $id = 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 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // 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 @@ class ConfigTranslationListUiTest extends BrowserTestBase { $vocabulary = Vocabulary::create([ 'name' => $this->randomMachineName(), 'description' => $this->randomMachineName(), - 'vid' => mb_strtolower($this->randomMachineName()), + 'vid' => $this->randomMachineName(), ]); $vocabulary->save(); @@ -199,7 +199,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // 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 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test contact form to decouple looking for translate operations // link so this does not test more than necessary. $contact_form = ContactForm::create([ - 'id' => mb_strtolower($this->randomMachineName(16)), + 'id' => $this->randomMachineName(16), 'label' => $this->randomMachineName(), ]); $contact_form->save(); @@ -248,7 +248,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test content type to decouple looking for translate operations // link so this does not test more than necessary. $content_type = $this->drupalCreateContentType([ - 'type' => mb_strtolower($this->randomMachineName(16)), + 'type' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), ]); @@ -271,7 +271,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test format to decouple looking for translate operations // link so this does not test more than necessary. $filter_format = FilterFormat::create([ - 'format' => mb_strtolower($this->randomMachineName(16)), + 'format' => $this->randomMachineName(16), 'name' => $this->randomMachineName(), ]); $filter_format->save(); @@ -295,7 +295,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { // Create a test shortcut to decouple looking for translate operations // link so this does not test more than necessary. $shortcut = ShortcutSet::create([ - 'id' => mb_strtolower($this->randomMachineName(16)), + 'id' => $this->randomMachineName(16), 'label' => $this->randomString(), ]); $shortcut->save(); @@ -318,7 +318,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { public function doUserRoleListTest() { // Create a test role to decouple looking for translate operations // link so this does not test more than necessary. - $role_id = mb_strtolower($this->randomMachineName(16)); + $role_id = $this->randomMachineName(16); $this->drupalCreateRole([], $role_id); // Get the role listing. @@ -400,7 +400,7 @@ class ConfigTranslationListUiTest extends BrowserTestBase { 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 0371c396853d..688009de5bbe 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 @@ class ConfigTranslationUiTest extends BrowserTestBase { 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 @@ class ConfigTranslationUiTest extends BrowserTestBase { $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 @@ class ConfigTranslationUiTest extends BrowserTestBase { */ 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 8035f6ac4415..7f8b1090dc07 100644 --- a/core/modules/contact/tests/src/Functional/ContactSitewideTest.php +++ b/core/modules/contact/tests/src/Functional/ContactSitewideTest.php @@ -163,16 +163,16 @@ class ContactSitewideTest extends BrowserTestBase { $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 @@ class ContactSitewideTest extends BrowserTestBase { $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 @@ class ContactSitewideTest extends BrowserTestBase { $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 @@ class ContactSitewideTest extends BrowserTestBase { $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 b84297ece50c..a0937614cdae 100644 --- a/core/modules/contact/tests/src/Functional/ContactStorageTest.php +++ b/core/modules/contact/tests/src/Functional/ContactStorageTest.php @@ -51,7 +51,7 @@ class ContactStorageTest extends ContactSitewideTest { $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 ae83c46e87ad..5865c2eaa391 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 @@ class ContactFieldsTest extends KernelTestBase { 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 57cc4cb641e1..ba935418fa70 100644 --- a/core/modules/datetime/tests/src/Functional/DateTestBase.php +++ b/core/modules/datetime/tests/src/Functional/DateTestBase.php @@ -114,8 +114,8 @@ abstract class DateTestBase extends BrowserTestBase { * 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 797cdc6803fd..67d8c328da62 100644 --- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -688,7 +688,7 @@ class DateTimeFieldTest extends DateTestBase { $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 @@ class DateTimeFieldTest extends DateTestBase { $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 7d477be4fce4..f19d18fd1b1e 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 @@ class DateRangeFieldTest extends DateTestBase { $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 @@ class DateRangeFieldTest extends DateTestBase { $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 9620f5cf8dce..ef8e75fb4663 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 @@ class DateRangeItemTest extends FieldKernelTestBase { // 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 74e4fc6301ba..beb7a5540b11 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 @@ class SeparatorTranslationTest extends KernelTestBase { // 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 4323d50139ab..985bc4a9be81 100644 --- a/core/modules/editor/tests/src/Functional/EditorAdminTest.php +++ b/core/modules/editor/tests/src/Functional/EditorAdminTest.php @@ -116,7 +116,7 @@ class EditorAdminTest extends BrowserTestBase { $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 66c238e73ea1..8d4705eea199 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 5e7ba126efcf..e200b90b2304 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 @@ class BooleanFieldTest extends BrowserTestBase { $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 5e7a3aaced55..1834993ce60f 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 @@ class BooleanFormatterSettingsTest extends BrowserTestBase { 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 @@ class BooleanFormatterSettingsTest extends BrowserTestBase { ]); $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 6171e08f100d..1bcd8aa65c98 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 @@ class EmailFieldTest extends BrowserTestBase { */ 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 5c2d299fcfae..3be9c473a41b 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 @@ class EntityReferenceAdminTest extends BrowserTestBase { $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 @@ class EntityReferenceAdminTest extends BrowserTestBase { /** @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 @@ class EntityReferenceAdminTest extends BrowserTestBase { $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 894cf63fe9e8..991214a4bb0e 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 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase { /** @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 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase { // 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 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase { ]); $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 f0c55c80ab91..8a94bc7ce395 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 @@ class EntityReferenceFieldDefaultValueTest extends BrowserTestBase { // 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 @@ class EntityReferenceFieldDefaultValueTest extends BrowserTestBase { $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 f7f9f0f9af70..ac025d78f661 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 @@ class StringFieldTest extends BrowserTestBase { */ 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 a7fb5a427138..f5317dcc8539 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 @@ class NumberFieldTest extends BrowserTestBase { */ 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 @@ class NumberFieldTest extends BrowserTestBase { $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 @@ class NumberFieldTest extends BrowserTestBase { */ 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 @@ class NumberFieldTest extends BrowserTestBase { */ 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 @@ class NumberFieldTest extends BrowserTestBase { */ 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 aeee7c512750..54b1faf9d46a 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 583852beccdf..c7ebc597a6e1 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 @@ class BooleanFormatterSettingsTest extends WebDriverTestBase { 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 @@ class BooleanFormatterSettingsTest extends WebDriverTestBase { ]); $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 6b32c4eedc02..5e0fb206b50e 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 @@ class EntityReferenceAdminTest extends WebDriverTestBase { $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 523677945178..e06acc1b1408 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 @@ class NumberFieldTest extends WebDriverTestBase { * 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 acebe47fdaa0..06e22f6a8321 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 @@ class BooleanFormatterTest extends KernelTestBase { $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 10fda5adc584..cb59668fae38 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 @@ class EntityReferenceItemTest extends FieldKernelTestBase { $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 @@ class EntityReferenceItemTest extends FieldKernelTestBase { // 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 @@ class EntityReferenceItemTest extends FieldKernelTestBase { * 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 92b4fa1da293..7a5301c4aff2 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 @@ class EntityReferenceSettingsTest extends KernelTestBase { $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 @@ class EntityReferenceSettingsTest extends KernelTestBase { /** @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 @@ class EntityReferenceSettingsTest extends KernelTestBase { $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 @@ class EntityReferenceSettingsTest extends KernelTestBase { */ 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 505eca676b59..c0cf2c69d9f3 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 @@ class SelectionTest extends KernelTestBase { $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 117b80cc7d18..751ec5cd5a0e 100644 --- a/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php +++ b/core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php @@ -294,7 +294,7 @@ class FieldAttachStorageTest extends FieldKernelTestBase { $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 @@ class FieldAttachStorageTest extends FieldKernelTestBase { $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 @@ class FieldAttachStorageTest extends FieldKernelTestBase { 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 0742f856f8c1..66087c97076c 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -45,7 +45,7 @@ class FieldCrudTest extends FieldKernelTestBase { 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 @@ class FieldCrudTest extends FieldKernelTestBase { * 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 3d81d09d5654..09801aea26b2 100644 --- a/core/modules/field/tests/src/Kernel/FieldDisplayTest.php +++ b/core/modules/field/tests/src/Kernel/FieldDisplayTest.php @@ -67,7 +67,7 @@ class FieldDisplayTest extends KernelTestBase { $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 d02f238daad4..130233c9d747 100644 --- a/core/modules/field/tests/src/Kernel/FieldFormatterTest.php +++ b/core/modules/field/tests/src/Kernel/FieldFormatterTest.php @@ -54,7 +54,7 @@ class FieldFormatterTest extends KernelTestBase { $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 5200f8e0152e..a6dd4bae1cf5 100644 --- a/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php +++ b/core/modules/field/tests/src/Kernel/FieldKernelTestBase.php @@ -98,7 +98,7 @@ abstract class FieldKernelTestBase extends KernelTestBase { $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 7bdaba595647..ca57b071bd43 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 @@ class RawStringFormatterTest extends KernelTestBase { $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 94878dbd1275..36551fb4acb2 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 @@ class StringFormatterTest extends KernelTestBase { $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 2e5e7349aafb..d846586b4f22 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 @@ class TimestampFormatterTest extends KernelTestBase { $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 0cd0c0946c8f..8e9dc31bb280 100644 --- a/core/modules/field/tests/src/Kernel/TranslationTest.php +++ b/core/modules/field/tests/src/Kernel/TranslationTest.php @@ -76,7 +76,7 @@ class TranslationTest extends FieldKernelTestBase { $this->installEntitySchema('node'); $this->installConfig(['language']); - $this->fieldName = mb_strtolower($this->randomMachineName()); + $this->fieldName = $this->randomMachineName(); $this->entityType = 'entity_test'; @@ -141,7 +141,7 @@ class TranslationTest extends FieldKernelTestBase { } // 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 1ea0db728dc8..f0defeedcd52 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 @@ class UriItemTest extends FieldKernelTestBase { $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 fea239374b6f..5343cc444c73 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 @@ class EntityDisplayModeTest extends BrowserTestBase { // 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 @@ class EntityDisplayModeTest extends BrowserTestBase { // Test adding a view mode. $edit = [ - 'id' => strtolower($this->randomMachineName()), + 'id' => $this->randomMachineName(), 'label' => $this->randomString(), ]; $this->submitForm($edit, 'Save'); @@ -119,7 +119,7 @@ class EntityDisplayModeTest extends BrowserTestBase { // 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 @@ class EntityDisplayModeTest extends BrowserTestBase { // 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 b83dd5a025bf..b0631dde7eeb 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 @@ class FieldUIDeleteTest extends BrowserTestBase { $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 @@ class FieldUIDeleteTest extends BrowserTestBase { $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 d1af28fc86cd..254704993e40 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 @@ class ManageDisplayTest extends BrowserTestBase { $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 @@ class ManageDisplayTest extends BrowserTestBase { $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 c1fc660c4003..349aa8a69184 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 @@ class ManageFieldsFunctionalTest extends BrowserTestBase { $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 = '' . $this->randomMachineName(8) . ''; - $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 @@ class ManageFieldsFunctionalTest extends BrowserTestBase { */ 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 @@ class ManageFieldsFunctionalTest extends BrowserTestBase { $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 @@ class ManageFieldsFunctionalTest extends BrowserTestBase { 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 59e70d11d5eb..e782b5255a12 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 @@ class ManageDisplayTest extends WebDriverTestBase { $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 8610bab794de..bce2bafccbc4 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 @@ class EntityDisplayTest extends KernelTestBase { // 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 43dfa4fc2384..52d46385b93e 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 @@ class FileFieldDisplayTest extends FileFieldTestBase { * 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 @@ class FileFieldDisplayTest extends FileFieldTestBase { 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 @@ class FileFieldDisplayTest extends FileFieldTestBase { * 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 0e8100c15454..95deedc0355a 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 4a139ab7da51..084e492b2dfa 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 fced38d132a2..5473fcac398e 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 641093dc7add..1b472927b79d 100644 --- a/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldRevisionTest.php @@ -36,7 +36,7 @@ class FileFieldRevisionTest extends FileFieldTestBase { ->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 292d24abc07c..4cc0aaf88539 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 @@ class FileFieldValidateTest extends FileFieldTestBase { 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 @@ class FileFieldValidateTest extends FileFieldTestBase { 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 4f9051979a4d..83e12945fd60 100644 --- a/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/Functional/FileFieldWidgetTest.php @@ -81,7 +81,7 @@ class FileFieldWidgetTest extends FileFieldTestBase { 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { // 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { */ 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { * 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { 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 @@ class FileFieldWidgetTest extends FileFieldTestBase { 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 cce9408ceb10..41df460cb714 100644 --- a/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php +++ b/core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php @@ -45,7 +45,7 @@ class FileOnTranslatedEntityTest extends FileFieldTestBase { $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 9eb41af8f6bd..05d1bba1c989 100644 --- a/core/modules/file/tests/src/Functional/FilePrivateTest.php +++ b/core/modules/file/tests/src/Functional/FilePrivateTest.php @@ -47,7 +47,7 @@ class FilePrivateTest extends FileFieldTestBase { /** @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 86fe0ed5d176..67cb13cb2b67 100644 --- a/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php +++ b/core/modules/file/tests/src/Functional/FileTokenReplaceTest.php @@ -31,7 +31,7 @@ class FileTokenReplaceTest extends FileFieldTestBase { // 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 df630fad2a1f..af57e3d7c9a4 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 @@ abstract class FileMediaFormatterTestBase extends BrowserTestBase { */ 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 d116babc53f2..8f40b33c09df 100644 --- a/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php +++ b/core/modules/file/tests/src/Functional/PrivateFileOnTranslatedEntityTest.php @@ -39,7 +39,7 @@ class PrivateFileOnTranslatedEntityTest extends FileFieldTestBase { $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 1d50b3bfd7a4..450280276166 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 a947bb841af6..4eb5daab4746 100644 --- a/core/modules/filter/tests/src/Functional/FilterAdminTest.php +++ b/core/modules/filter/tests/src/Functional/FilterAdminTest.php @@ -129,7 +129,7 @@ class FilterAdminTest extends BrowserTestBase { // 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 @@ class FilterAdminTest extends BrowserTestBase { // 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 @@ class FilterAdminTest extends BrowserTestBase { */ 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 a2a9a415ebf3..97ef25a641e8 100644 --- a/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php +++ b/core/modules/filter/tests/src/Functional/FilterDefaultFormatTest.php @@ -35,7 +35,7 @@ class FilterDefaultFormatTest extends BrowserTestBase { $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 98cc8e42d574..e96a7c806aa2 100644 --- a/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php +++ b/core/modules/filter/tests/src/Functional/FilterFormatAccessTest.php @@ -94,7 +94,7 @@ class FilterFormatAccessTest extends BrowserTestBase { $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 c8e33190b867..e80141bc696f 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 @@ class FilterHooksTest extends BrowserTestBase { // 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 38f8ded293e1..d62f0a0e3d94 100644 --- a/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/Functional/ImageAdminStylesTest.php @@ -80,7 +80,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase { $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 @@ class ImageAdminStylesTest extends ImageFieldTestBase { // 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 @@ class ImageAdminStylesTest extends ImageFieldTestBase { */ 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 @@ class ImageAdminStylesTest extends ImageFieldTestBase { $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 @@ class ImageAdminStylesTest extends ImageFieldTestBase { $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 @@ class ImageAdminStylesTest extends ImageFieldTestBase { */ 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 7ee4a19a4517..9ac7dd18f3e2 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDefaultImagesTest.php @@ -62,7 +62,7 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase { // 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 @@ class ImageFieldDefaultImagesTest extends ImageFieldTestBase { */ 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 7502129a79a0..4874e98f4997 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldDisplayTest.php @@ -59,7 +59,7 @@ class ImageFieldDisplayTest extends ImageFieldTestBase { /** @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 @@ class ImageFieldDisplayTest extends ImageFieldTestBase { $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 @@ class ImageFieldDisplayTest extends ImageFieldTestBase { /** @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 @@ class ImageFieldDisplayTest extends ImageFieldTestBase { $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 @@ class ImageFieldDisplayTest extends ImageFieldTestBase { $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 6bd66cf834a8..3228669215a8 100644 --- a/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/Functional/ImageFieldValidateTest.php @@ -29,7 +29,7 @@ class ImageFieldValidateTest extends ImageFieldTestBase { $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 @@ class ImageFieldValidateTest extends ImageFieldTestBase { */ 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 @@ class ImageFieldValidateTest extends ImageFieldTestBase { * 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 607435d91f95..6d90777c4347 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 64d2f92c7477..19538f36aea3 100644 --- a/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php +++ b/core/modules/image/tests/src/Functional/ImageOnTranslatedEntityTest.php @@ -49,7 +49,7 @@ class ImageOnTranslatedEntityTest extends ImageFieldTestBase { $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 820bedffa288..177186466763 100644 --- a/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php +++ b/core/modules/image/tests/src/Functional/ImageStyleFlushTest.php @@ -60,7 +60,7 @@ class ImageStyleFlushTest extends ImageFieldTestBase { 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 f7b5b68d5154..ec53cc58e734 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php @@ -23,7 +23,7 @@ class ImageAdminStylesTest extends ImageFieldTestBase { $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 b0a198312f8d..1bfe3e692e11 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 0def1eea4163..b2f67d1c4b29 100644 --- a/core/modules/image/tests/src/Kernel/ImageFormatterTest.php +++ b/core/modules/image/tests/src/Kernel/ImageFormatterTest.php @@ -58,7 +58,7 @@ class ImageFormatterTest extends FieldKernelTestBase { $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 2bd7360721c7..2c1f529f5041 100644 --- a/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php +++ b/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php @@ -212,8 +212,8 @@ class ConfigurableLanguageManagerTest extends BrowserTestBase { ]); // 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 9f1255bce7bd..c6d2be3bd274 100644 --- a/core/modules/link/tests/src/Functional/LinkFieldTest.php +++ b/core/modules/link/tests/src/Functional/LinkFieldTest.php @@ -86,7 +86,7 @@ class LinkFieldTest extends BrowserTestBase { * 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 @@ class LinkFieldTest extends BrowserTestBase { * 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 @@ class LinkFieldTest extends BrowserTestBase { * 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 @@ class LinkFieldTest extends BrowserTestBase { * 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 @@ class LinkFieldTest extends BrowserTestBase { 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 @@ class LinkFieldTest extends BrowserTestBase { * Tests