Adopt TestLogger for testing logging

Created on 10 March 2023, over 1 year ago
Updated 28 April 2023, over 1 year ago

Problem/Motivation

In πŸ“Œ Add colinodell/psr-test-logger to core's dev dependencies Fixed , the package colinodell/psr-testlogger is being added to core's dev dependencies. It provides a much clearer and easier way of testing that certain things are or are not logged, compared to using mocks.

The funny thing is, the functionality it provides was already part of the psr/log package that Drupal core depends on. In Drupal 9's version of psr/log, TestLogger is available for us to use. However, the Drupal 10 version of psr/log doesn't have it. It was split out into this separate package.

Since it's such a better solution than mocking logger channels, this issue is to adapt existing mocked loggers in core's tests to TestLogger, as soon as πŸ“Œ Add colinodell/psr-test-logger to core's dev dependencies Fixed lands.

πŸ“Œ Task
Status

Closed: won't fix

Version

10.1 ✨

Component
OtherΒ  β†’

Last updated about 20 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Comments & Activities

Production build 0.71.5 2024