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()
- 11.x 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.
6 calls to RandomGeneratorTrait::getRandomGenerator()
- BrowserTestBase::__get in core/
tests/ Drupal/ Tests/ BrowserTestBase.php - JsonApiFunctionalTestBase::createDefaultContent in core/
modules/ jsonapi/ tests/ src/ Functional/ JsonApiFunctionalTestBase.php - Creates default content to test the API.
- KernelTestBase::__get in core/
tests/ Drupal/ KernelTests/ KernelTestBase.php - 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 98
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.