You are here

trait RandomGeneratorTrait in SimpleTest 8.3

Provides random generator utility methods.

Hierarchy

Deprecated

in Drupal 8.1.1, will be removed before Drupal 9.0.0. Use \Drupal\Tests\RandomGeneratorTrait instead.

See also

\Drupal\Tests

File

src/RandomGeneratorTrait.php, line 17

Namespace

Drupal\simpletest
View source
trait RandomGeneratorTrait {
  use BaseGeneratorTrait;

}

Members

Namesort descending Modifiers Type Description Overrides
RandomGeneratorTrait::$randomGenerator protected property The random generator.
RandomGeneratorTrait::getRandomGenerator protected function Gets the random generator for the utility methods.
RandomGeneratorTrait::randomMachineName protected function Generates a unique random string containing letters and numbers. 1
RandomGeneratorTrait::randomObject public function Generates a random PHP object.
RandomGeneratorTrait::randomString public function Generates a pseudo-random string of ASCII characters of codes 32 to 126.
RandomGeneratorTrait::randomStringValidate public function Callback for random string validation.