Use UnitTestCase as parent class for Unit tests

Created on 2 July 2024, 10 months ago
Updated 16 July 2024, 9 months ago

Drupal\Tests\examples\Unit\RoutePathTest and Drupal\Tests\examples\Unit\YamlValidationTest use PHPUnit\Framework\TestCase as parent class.

They should instead have the Drupal\Tests\UnitTestCase class as parent class, since that class ensures that an instantiated container in the global state of \Drupal from a previous test does not leak into the Unit test.

📌 Task
Status

Fixed

Version

4.0

Component

Code

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

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