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.

Issue fork examples-3458476

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

apaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review

  • apaderno committed c58f46dc on 4.0.x
    Issue #3458476: Use UnitTestCase as parent class for Unit tests
avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.