You are here

protected function SelectOtherInstallTestScript::getRandomGenerator in CCK Select Other 8

Gets the random generator for the utility methods.

Return value

\Drupal\Component\Utility\Random The random generator

1 call to SelectOtherInstallTestScript::getRandomGenerator()
SelectOtherInstallTestScript::createSelectOtherListField in tests/src/TestSite/SelectOtherInstallTestScript.php
Creates a select other field on the content type.

File

tests/src/TestSite/SelectOtherInstallTestScript.php, line 201

Class

SelectOtherInstallTestScript
Setup file used for cck_select_other Nightwatch tests.

Namespace

Drupal\Tests\cck_select_other\TestSite

Code

protected function getRandomGenerator() {
  if (!is_object($this->randomGenerator)) {
    $this->randomGenerator = new Random();
  }
  return $this->randomGenerator;
}