diff -u b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php --- b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php @@ -1209,26 +1209,26 @@ * * @see \Drupal\Component\Utility\Random::string() * - * @param string $str + * @param string $string * The random string to validate. * * @return bool * TRUE if the random string is valid, FALSE if not. */ - public function randomStringValidate($str) { + public function randomStringValidate($string) { // Consecutive spaces causes issues for // Drupal\simpletest\WebTestBase::assertLink(). - if (preg_match('/\s{2,}/', $str)) { + if (preg_match('/\s{2,}/', $string)) { return FALSE; } // Starting with a space means that length might not be what is expected. - if (preg_match('/^\s/', $str)) { + if (preg_match('/^\s/', $string)) { return FALSE; } // Ending with a space means that length might not be what is expected. - if (preg_match('/\s$/', $str)) { + if (preg_match('/\s$/', $string)) { return FALSE; } diff -u b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php --- b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php +++ b/core/modules/simpletest/tests/Drupal/simpletest/Tests/TestBaseTest.php @@ -54,7 +54,7 @@ /** * Tests the random strings validation rules. * - * @param string $str + * @param string $string * The string to validate. * @param bool $expected * The expected result of the validation. @@ -63,8 +63,8 @@ * * @dataProvider randomStringValidateProvider */ - public function testRandomStringValidate($str, $expected) { - $actual = $this->stub->randomStringValidate($str); + public function testRandomStringValidate($string, $expected) { + $actual = $this->stub->randomStringValidate($string); $this->assertEquals($expected, $actual); } 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 @@ -162,15 +162,15 @@ * @see \Drupal\Component\Utility\Random::name() * @see \Drupal\Tests\Component\Utility\RandomTest::testRandomStringValidator() * - * @param string $str + * @param string $string * The random string to validate. * * @return bool * TRUE if the random string is valid, FALSE if not. */ - public function _RandomStringValidate($str) { + public function _RandomStringValidate($string) { if (empty($this->firstStringGenerated)) { - $this->firstStringGenerated = $str; + $this->firstStringGenerated = $string; return FALSE; } return TRUE;