diff --git a/core/modules/block/src/Tests/BlockHookOperationTest.php b/core/modules/block/src/Tests/BlockHookOperationTest.php index c83882c..2f4f319 100644 --- a/core/modules/block/src/Tests/BlockHookOperationTest.php +++ b/core/modules/block/src/Tests/BlockHookOperationTest.php @@ -9,7 +9,6 @@ namespace Drupal\block\Tests; -use Drupal\Component\Utility\Unicode; use Drupal\simpletest\WebTestBase; /** @@ -44,7 +43,7 @@ protected function setUp() { 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 = Unicode::strtolower($this->randomMachineName(16)); + $block_id = $this->randomLowercaseMachineName(16); $this->drupalPlaceBlock('system_powered_by_block', array('id' => $block_id)); // Get the Block listing. diff --git a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php b/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php index d17fc3b..f934cc9 100644 --- a/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php +++ b/core/modules/block_content/src/Tests/BlockContentTranslationUITest.php @@ -7,7 +7,6 @@ namespace Drupal\block_content\Tests; -use Drupal\Component\Utility\Unicode; use Drupal\content_translation\Tests\ContentTranslationUITestBase; /** @@ -94,7 +93,7 @@ protected function createBlockContent($title = FALSE, $bundle = FALSE) { * Overrides \Drupal\content_translation\Tests\ContentTranslationUITestBase::getNewEntityValues(). */ protected function getNewEntityValues($langcode) { - return array('info' => Unicode::strtolower($this->randomMachineName())) + parent::getNewEntityValues($langcode); + return ['info' => $this->randomLowercaseMachineName()] + parent::getNewEntityValues($langcode); } /** diff --git a/core/modules/block_content/src/Tests/PageEditTest.php b/core/modules/block_content/src/Tests/PageEditTest.php index fdd1743..7bb2712 100644 --- a/core/modules/block_content/src/Tests/PageEditTest.php +++ b/core/modules/block_content/src/Tests/PageEditTest.php @@ -8,7 +8,6 @@ namespace Drupal\block_content\Tests; use Drupal\block_content\Entity\BlockContent; -use Drupal\Component\Utility\Unicode; /** * Create a block and test block edit functionality. @@ -27,7 +26,7 @@ public function testPageEdit() { $body_key = 'body[0][value]'; // Create block to edit. $edit = array(); - $edit['info[0][value]'] = Unicode::strtolower($this->randomMachineName(8)); + $edit['info[0][value]'] = $this->randomLowercaseMachineName(); $edit[$body_key] = $this->randomMachineName(16); $this->drupalPostForm('block/add/basic', $edit, t('Save')); diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 6a63df7..bb39faf 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -7,7 +7,6 @@ namespace Drupal\config\Tests; -use Drupal\Component\Utility\Unicode; use Drupal\Core\Archiver\ArchiveTar; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; @@ -107,7 +106,7 @@ public function testExportImport() { $this->contentType = $this->drupalCreateContentType(); // Create a field. - $this->fieldName = Unicode::strtolower($this->randomMachineName()); + $this->fieldName = $this->randomLowercaseMachineName(); $this->fieldStorage = entity_create('field_storage_config', array( 'field_name' => $this->fieldName, 'entity_type' => 'node', diff --git a/core/modules/config/src/Tests/ConfigImportRecreateTest.php b/core/modules/config/src/Tests/ConfigImportRecreateTest.php index 83ea2ee..705060b 100644 --- a/core/modules/config/src/Tests/ConfigImportRecreateTest.php +++ b/core/modules/config/src/Tests/ConfigImportRecreateTest.php @@ -7,7 +7,6 @@ namespace Drupal\config\Tests; -use Drupal\Component\Utility\Unicode; use Drupal\Core\Config\ConfigImporter; use Drupal\Core\Config\StorageComparer; use Drupal\node\Entity\NodeType; @@ -62,7 +61,7 @@ protected function setUp() { } public function testRecreateEntity() { - $type_name = Unicode::strtolower($this->randomMachineName(16)); + $type_name = $this->randomLowercaseMachineName(16); $content_type = entity_create('node_type', array( 'type' => $type_name, 'name' => 'Node type one', diff --git a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php index 118c1cb..2f5ecd6 100644 --- a/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php +++ b/core/modules/config/src/Tests/ConfigImportRenameValidationTest.php @@ -8,7 +8,6 @@ namespace Drupal\config\Tests; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\Unicode; use Drupal\Component\Uuid\Php; use Drupal\Core\Config\ConfigImporter; use Drupal\Core\Config\ConfigImporterException; @@ -86,7 +85,7 @@ public function testRenameValidation() { // Create a content type with a matching UUID in the active storage. $content_type = entity_create('node_type', array( - 'type' => Unicode::strtolower($this->randomMachineName(16)), + 'type' => $this->randomLowercaseMachineName(16), 'name' => $this->randomMachineName(), 'uuid' => $uuid, )); diff --git a/core/modules/field/src/Tests/Number/NumberFieldTest.php b/core/modules/field/src/Tests/Number/NumberFieldTest.php index a3226a9..d541796 100644 --- a/core/modules/field/src/Tests/Number/NumberFieldTest.php +++ b/core/modules/field/src/Tests/Number/NumberFieldTest.php @@ -7,7 +7,6 @@ namespace Drupal\field\Tests\Number; -use Drupal\Component\Utility\Unicode; use Drupal\simpletest\WebTestBase; /** @@ -42,7 +41,7 @@ protected function setUp() { */ function testNumberDecimalField() { // Create a field with settings to validate. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = $this->randomLowercaseMachineName(); entity_create('field_storage_config', array( 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -132,7 +131,7 @@ function testNumberIntegerField() { $maximum = rand(2000, 4000); // Create a field with settings to validate. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = $this->randomLowercaseMachineName(); $storage = entity_create('field_storage_config', array( 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -242,7 +241,7 @@ function testNumberIntegerField() { */ function testNumberFloatField() { // Create a field with settings to validate. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = $this->randomLowercaseMachineName(); entity_create('field_storage_config', array( 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -331,9 +330,9 @@ function testNumberFloatField() { * Test default formatter behavior */ function testNumberFormatter() { - $type = Unicode::strtolower($this->randomMachineName()); - $float_field = Unicode::strtolower($this->randomMachineName()); - $integer_field = Unicode::strtolower($this->randomMachineName()); + $type = $this->randomLowercaseMachineName(); + $float_field = $this->randomLowercaseMachineName(); + $integer_field = $this->randomLowercaseMachineName(); $thousand_separators = array('', '.', ',', ' ', chr(8201), "'"); $decimal_separators = array('.', ','); $prefix = $this->randomMachineName(); @@ -467,7 +466,7 @@ function testNumberFormatter() { */ function testCreateNumberFloatField() { // Create a float field. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = $this->randomLowercaseMachineName(); entity_create('field_storage_config', array( 'field_name' => $field_name, 'entity_type' => 'entity_test', @@ -492,7 +491,7 @@ function testCreateNumberFloatField() { */ function testCreateNumberDecimalField() { // Create a decimal field. - $field_name = Unicode::strtolower($this->randomMachineName()); + $field_name = $this->randomLowercaseMachineName(); entity_create('field_storage_config', array( 'field_name' => $field_name, 'entity_type' => 'entity_test', diff --git a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php index e8a7c1b..d11f293 100644 --- a/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php +++ b/core/modules/views/src/Tests/Entity/ViewEntityDependenciesTest.php @@ -7,7 +7,6 @@ namespace Drupal\views\Tests\Entity; -use Drupal\Component\Utility\Unicode; use Drupal\field\Entity\FieldStorageConfig; use Drupal\views\Tests\ViewTestData; use Drupal\views\Tests\ViewKernelTestBase; @@ -58,7 +57,7 @@ protected function setUp() { )); $content_type->save(); $field_storage = entity_create('field_storage_config', array( - 'field_name' => Unicode::strtolower($this->randomMachineName()), + 'field_name' => $this->randomLowercaseMachineName(), 'entity_type' => 'node', 'type' => 'comment', ));