function RandomGeneratorTrait::getRandomGenerator
Same name in other branches
- 9 core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait::getRandomGenerator()
- 8.9.x core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait::getRandomGenerator()
- 10 core/tests/Drupal/Tests/RandomGeneratorTrait.php \Drupal\Tests\RandomGeneratorTrait::getRandomGenerator()
Gets the random generator for the utility methods.
Return value
\Drupal\Component\Utility\Random The random generator.
3 calls to RandomGeneratorTrait::getRandomGenerator()
- JsonApiFunctionalTestBase::createDefaultContent in core/
modules/ jsonapi/ tests/ src/ Functional/ JsonApiFunctionalTestBase.php - Creates default content to test the API.
- StorageComparerTest::generateRandomData in core/
tests/ Drupal/ Tests/ Core/ Config/ StorageComparerTest.php - Generate random data in a config storage.
- StorageCopyTraitTest::generateRandomData in core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php - Generate random data in a config storage.
File
-
core/
tests/ Drupal/ Tests/ RandomGeneratorTrait.php, line 76
Class
- RandomGeneratorTrait
- Provides random generator utility methods.
Namespace
Drupal\TestsCode
protected function getRandomGenerator() {
return Random::getGenerator();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.