projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Security update for Core, with self-updated composer
[yaffs-website]
/
web
/
core
/
tests
/
Drupal
/
Tests
/
Component
/
PhpStorage
/
PhpStorageTestBase.php
diff --git
a/web/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
b/web/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
index f32155e39c85ccee2a60f8bfbc901c065fac0d9c..cc0e79d0e0272915bbf3b145787412136b9812ca 100644
(file)
--- a/
web/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
+++ b/
web/core/tests/Drupal/Tests/Component/PhpStorage/PhpStorageTestBase.php
@@
-3,13
+3,14
@@
namespace Drupal\Tests\Component\PhpStorage;
use Drupal\Component\PhpStorage\PhpStorageInterface;
namespace Drupal\Tests\Component\PhpStorage;
use Drupal\Component\PhpStorage\PhpStorageInterface;
-use Drupal\
Tests\UnitTestCase
;
+use Drupal\
Component\Utility\Random
;
use org\bovigo\vfs\vfsStream;
use org\bovigo\vfs\vfsStream;
+use PHPUnit\Framework\TestCase;
/**
* Base test for PHP storages.
*/
/**
* Base test for PHP storages.
*/
-abstract class PhpStorageTestBase extends
Unit
TestCase {
+abstract class PhpStorageTestBase extends TestCase {
/**
* A unique per test class directory path to test php storage.
/**
* A unique per test class directory path to test php storage.
@@
-31,7
+32,10
@@
abstract class PhpStorageTestBase extends UnitTestCase {
* Assert that a PHP storage's load/save/delete operations work.
*/
public function assertCRUD($php) {
* Assert that a PHP storage's load/save/delete operations work.
*/
public function assertCRUD($php) {
- $name = $this->randomMachineName() . '/' . $this->randomMachineName() . '.php';
+ // Random generator.
+ $random_generator = new Random();
+
+ $name = $random_generator->name(8, TRUE) . '/' . $random_generator->name(8, TRUE) . '.php';
// Find a global that doesn't exist.
do {
// Find a global that doesn't exist.
do {