trait RandomGeneratorTrait in Drupal 8
Same name in this branch
- 8 core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait
- 8 core/modules/simpletest/src/RandomGeneratorTrait.php \Drupal\simpletest\RandomGeneratorTrait
Provides random generator utility methods.
Hierarchy
- trait \Drupal\simpletest\RandomGeneratorTrait uses 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RandomGeneratorTrait:: |
protected | property | The random generator. | |
RandomGeneratorTrait:: |
protected | function | Gets the random generator for the utility methods. | |
RandomGeneratorTrait:: |
protected | function | Generates a unique random string containing letters and numbers. | 1 |
RandomGeneratorTrait:: |
public | function | Generates a random PHP object. | |
RandomGeneratorTrait:: |
public | function | Generates a pseudo-random string of ASCII characters of codes 32 to 126. | |
RandomGeneratorTrait:: |
public | function | Callback for random string validation. |