trait RandomGeneratorTrait
Same name in this branch
- 8.9.x core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait
- 10 core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait
- 9 core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait
Provides random generator utility methods.
Hierarchy
- trait \Drupal\simpletest\RandomGeneratorTrait uses \Drupal\Tests\RandomGeneratorTrait
Deprecated
in drupal:8.1.1 and is removed from drupal:9.0.0. Use \Drupal\Tests\RandomGeneratorTrait instead.
See also
\Drupal\Tests
File
-
core/
modules/ simpletest/ src/ RandomGeneratorTrait.php, line 17
Namespace
Drupal\simpletestView source
trait RandomGeneratorTrait {
use BaseGeneratorTrait;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
RandomGeneratorTrait::$randomGenerator | protected | property | The random generator. | |
RandomGeneratorTrait::getRandomGenerator | protected | function | Gets the random generator for the utility methods. | |
RandomGeneratorTrait::randomMachineName | protected | function | Generates a unique random string containing letters and numbers. | 1 |
RandomGeneratorTrait::randomObject | public | function | Generates a random PHP object. | |
RandomGeneratorTrait::randomString | public | function | Generates a pseudo-random string of ASCII characters of codes 32 to 126. | |
RandomGeneratorTrait::randomStringValidate | public | function | Callback for random string validation. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.