Problem/Motivation
As part of #2847428: [Meta] Modernize dblog module the plan is to use Kernel Tests to test the dblog module without require an UI.
The candidates for a Kernel Test are:
- #2848529: Move DbLogTest::verifyCron to a kernel test
- #2458191: Provide a storage backend for dblog module
Which requires generate log entries.
It would be nice to abstract the DbLogTest::generateLogEntries()
method into a trait to reuse it in both Kernel and Web based tests.
Proposed resolution
- Create a new Trait to generate log entries.
- Use this trait in
Drupal\dblog\Tests
. and in Kernel Tests
Remaining tasks
User interface changes
None
API changes
A new Trait.