Issue #2032453 by Berdir: Fixed Random fail: WebTestBase::randomString returning a string containing a $ followed by a number causes assertLink() to fail.

8.0.x
Nathaniel Catchpole 2013-09-17 10:12:09 +01:00
parent 446016a7db
commit d793cca597
1 changed files with 3 additions and 1 deletions

View File

@ -169,7 +169,9 @@ class RandomTest extends UnitTestCase {
* TRUE if the random string is valid, FALSE if not.
*/
public function _RandomStringValidate($string) {
if (empty($this->firstStringGenerated)) {
// Return FALSE for the first generated string and any string that is the
// same, as the test expects a different string to be returned.
if (empty($this->firstStringGenerated) || $string == $this->firstStringGenerated) {
$this->firstStringGenerated = $string;
return FALSE;
}