use Drupal\Component\PhpStorage\FileStorage;
use Drupal\Component\PhpStorage\FileReadOnlyStorage;
+use Drupal\Component\Utility\Random;
/**
* @coversDefaultClass \Drupal\Component\PhpStorage\FileReadOnlyStorage
* Tests writing with one class and reading with another.
*/
public function testReadOnly() {
+ // Random generator.
+ $random = new Random();
+
$php = new FileStorage($this->standardSettings);
- $name = $this->randomMachineName() . '/' . $this->randomMachineName() . '.php';
+ $name = $random->name(8, TRUE) . '/' . $random->name(8, TRUE) . '.php';
// Find a global that doesn't exist.
do {
* @covers ::deleteAll
*/
public function testDeleteAll() {
+ // Random generator.
+ $random = new Random();
+
$php = new FileStorage($this->standardSettings);
- $name = $this->randomMachineName() . '/' . $this->randomMachineName() . '.php';
+ $name = $random->name(8, TRUE) . '/' . $random->name(8, TRUE) . '.php';
// Find a global that doesn't exist.
do {