function RandomTest::testRandomWordValidator

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/RandomTest.php \Drupal\Tests\Component\Utility\RandomTest::testRandomWordValidator()
  2. 11.x core/tests/Drupal/Tests/Component/Utility/RandomTest.php \Drupal\Tests\Component\Utility\RandomTest::testRandomWordValidator()

Tests random word.

@covers ::word

File

core/tests/Drupal/Tests/Component/Utility/RandomTest.php, line 197

Class

RandomTest
Tests random data generation.

Namespace

Drupal\Tests\Component\Utility

Code

public function testRandomWordValidator() : void {
    $random = new Random();
    $this->assertNotEquals($random->word(20), $random->word(20));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.