From 44448c57865f02602664961161717161c3fd88fe Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 31 Jul 2026 20:53:18 +0200 Subject: [PATCH] Fix swapped preCondition and postCondition attribute mapping --- config/sets/annotations-to-attributes.php | 4 +- .../Fixture/pre_post_condition.php.inc | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 tests/AnnotationsToAttributes/Fixture/pre_post_condition.php.inc diff --git a/config/sets/annotations-to-attributes.php b/config/sets/annotations-to-attributes.php index a5b81221..3cebf900 100644 --- a/config/sets/annotations-to-attributes.php +++ b/config/sets/annotations-to-attributes.php @@ -69,8 +69,8 @@ new AnnotationToAttribute('doesNotPerformAssertions', 'PHPUnit\Framework\Attributes\DoesNotPerformAssertions'), new AnnotationToAttribute('large', 'PHPUnit\Framework\Attributes\Large'), new AnnotationToAttribute('medium', 'PHPUnit\Framework\Attributes\Medium'), - new AnnotationToAttribute('preCondition', 'PHPUnit\Framework\Attributes\PostCondition'), - new AnnotationToAttribute('postCondition', 'PHPUnit\Framework\Attributes\PreCondition'), + new AnnotationToAttribute('preCondition', 'PHPUnit\Framework\Attributes\PreCondition'), + new AnnotationToAttribute('postCondition', 'PHPUnit\Framework\Attributes\PostCondition'), new AnnotationToAttribute('runInSeparateProcess', 'PHPUnit\Framework\Attributes\RunInSeparateProcess'), new AnnotationToAttribute( 'runTestsInSeparateProcesses', diff --git a/tests/AnnotationsToAttributes/Fixture/pre_post_condition.php.inc b/tests/AnnotationsToAttributes/Fixture/pre_post_condition.php.inc new file mode 100644 index 00000000..b30df5e5 --- /dev/null +++ b/tests/AnnotationsToAttributes/Fixture/pre_post_condition.php.inc @@ -0,0 +1,41 @@ + +----- +