Entities are not cleaned up when a test generates PHP watchdog messages

Created on 4 September 2024, 4 months ago

Problem/Motivation

See \weitzman\DrupalTestTraits\ExistingSiteBase::tearDown().
When failOnPhpWatchdogMessages is on (which it is by default), and a test generates a PHP notice/warning/..., a PhpWatchdogException is thrown and the regular tear down process is halted. This causes entities, that were created during the test, to not be cleaned up.

Proposed resolution

Throw PhpWatchdogException after the tear down has happened.

🐛 Bug report
Status

Needs review

Version

2.3

Component

Code

Created by

🇧🇪Belgium rp7

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024