diff --git a/core/tests/Drupal/Tests/RandomGeneratorTrait.php b/core/tests/Drupal/Tests/RandomGeneratorTrait.php index b39bd7f29b7b463b5870d2c390a17cf87950a58b..eccac674f1b414f42e79d3a2ea01c8f031c3d7a7 100644 --- a/core/tests/Drupal/Tests/RandomGeneratorTrait.php +++ b/core/tests/Drupal/Tests/RandomGeneratorTrait.php @@ -41,8 +41,15 @@ public function randomString($length = 8) { * * @return bool * TRUE if the random string is valid, FALSE if not. + * + * @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. + * Use \Drupal\TestTools\Random::stringValidate() instead. + * + * @see https://www.drupal.org/node/3358389 */ public function randomStringValidate($string) { + @trigger_error(__METHOD__ . "() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\TestTools\Random::stringValidate() instead. See https://www.drupal.org/node/3358389", E_USER_DEPRECATED); + return Random::stringValidate($string); }