Use RandomGeneratorTrait in UnitTestCase and remove direct implementations of randomMachineName and getRandomGenerator

Created on 5 May 2023, over 1 year ago

Problem/Motivation

There are also \Drupal\Tests\UnitTestCase::randomMachineName and v\Drupal\Tests\UnitTestCase::getRandomGenerator that are now basically copies of the methods in the Trait.

Do we want/need to do anything with those?

@Spokje in #3358186-7: [META] Deprecate non-static random generation methods from RandomGeneratorTrait

Maybe in UnitTestCase we could use the trait and remove the direct implementations?

@mondrake in #3358186-8: [META] Deprecate non-static random generation methods from RandomGeneratorTrait

Steps to reproduce

Proposed resolution

In \Drupal\Tests\UnitTestCase use the RandomGeneratorTrait trait and remove the direct implementations.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.1

Component
PHPUnit 

Last updated about 6 hours ago

Created by

🇳🇱Netherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024