Skip to content

Commit

Permalink
Fix the state resetting between tests
Browse files Browse the repository at this point in the history
The old logic was missing part of the state:

- it was not resetting the enabled types in the mask
- it was not resetting the new ignoredLinks property
  • Loading branch information
stof committed Jun 2, 2023
1 parent ed7d767 commit f6f2c45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/Doctrine/Deprecations/DeprecationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DeprecationTest extends TestCase

public function setUp(): void
{
// reset the global state of Deprecation class accross tests
// reset the global state of Deprecation class across tests
$reflectionProperty = new ReflectionProperty(Deprecation::class, 'ignoredPackages');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue([]);
Expand All @@ -34,6 +34,8 @@ public function setUp(): void
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue([]);

Deprecation::disable();

Deprecation::enableTrackingDeprecations();
}

Expand Down

0 comments on commit f6f2c45

Please sign in to comment.