protected function UnitTestCase::getRandomGenerator in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/UnitTestCase.php \Drupal\Tests\UnitTestCase::getRandomGenerator()
Gets the random generator for the utility methods.
Return value
\Drupal\Component\Utility\Random The random generator
File
- core/
tests/ Drupal/ Tests/ UnitTestCase.php, line 76 - Contains \Drupal\Tests\UnitTestCase.
Class
- UnitTestCase
- Provides a base class and helpers for Drupal unit tests.
Namespace
Drupal\TestsCode
protected function getRandomGenerator() {
if (!is_object($this->randomGenerator)) {
$this->randomGenerator = new Random();
}
return $this->randomGenerator;
}