Skip to content

Commit 08ed128

Browse files
committed
[Testing] Reset PHP version after ClassDependencyManipulatorTest
1 parent bf2ad39 commit 08ed128

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tests/NodeManipulator/ClassDependencyManipulatorTest.php‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Rector\NodeManipulator\ClassDependencyManipulator;
2323
use Rector\PostRector\ValueObject\PropertyMetadata;
2424
use Rector\Testing\PHPUnit\AbstractLazyTestCase;
25+
use Rector\ValueObject\PhpVersion;
2526
use Rector\ValueObject\PhpVersionFeature;
2627

2728
final class ClassDependencyManipulatorTest extends AbstractLazyTestCase
@@ -42,6 +43,12 @@ protected function setUp(): void
4243
SimpleParameterProvider::setParameter(Option::PHP_VERSION_FEATURES, PhpVersionFeature::READONLY_PROPERTY);
4344
}
4445

46+
protected function tearDown(): void
47+
{
48+
// reset to the test default, so the next test class in the same process does not run on PHP 8.1
49+
SimpleParameterProvider::setParameter(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_10);
50+
}
51+
4552
public function testEmptyClass(): void
4653
{
4754
$someClass = new Class_(new Identifier('EmptyClass'));

0 commit comments

Comments
 (0)