diff -u b/core/lib/Drupal/Component/Utility/Random.php b/core/lib/Drupal/Component/Utility/Random.php --- b/core/lib/Drupal/Component/Utility/Random.php +++ b/core/lib/Drupal/Component/Utility/Random.php @@ -46,7 +46,8 @@ * @param int $length * Length of random string to generate. * @param bool $unique - * Ensure that the random string returned is unique. + * (optional) If TRUE ensures that the random string returned is unique. + * Defaults to FALSE. * * @return string * Randomly generated string. @@ -86,7 +87,8 @@ * @param int $length * Length of random string to generate. * @param bool $unique - * Ensure that the random name returned is unique. + * (optional) If TRUE ensures that the random string returned is unique. + * Defaults to FALSE. * * @return string * Randomly generated string. diff -u b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php --- b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php @@ -31,7 +31,7 @@ * * @see \Drupal\Component\Utility\Random::name() */ - function testRandomStringUniqueness() { + public function testRandomStringUniqueness() { $strings = array(); for ($i = 0; $i <= 50; $i++) { $str = Random::string(1, TRUE); @@ -45,7 +45,7 @@ * * @see \Drupal\Component\Utility\Random::string() */ - function testRandomNamesUniqueness() { + public function testRandomNamesUniqueness() { $names = array(); for ($i = 0; $i <= 10; $i++) { $str = Random::name(1, TRUE);