Skip to content

[CodeQuality] Extend FlipAssertRector to more assert methods and expected value shapes - #787

Merged
TomasVotruba merged 1 commit into
rectorphp:mainfrom
yoannblot:flip-assert-more-cases
Sep 24, 2026
Merged

TomasVotruba merged 1 commit into
rectorphp:mainfrom
yoannblot:flip-assert-more-cases

Conversation

@yoannblot

Copy link
Copy Markdown
Contributor

Closes rectorphp/rector#9913

  • more (expected, actual) methods: *Canonicalizing, *IgnoringCase, *WithDelta
  • expected value shapes: literal arrays, negative numbers/constants, enum ->value/->name, new with literal args, literal concat
  • array with variables flipped only against a computed actual (method/property/dim fetch)
  • skip named arguments

@TomasVotruba

Copy link
Copy Markdown
Member

Checked it briefly, LGTM.

Thank you 💪

@TomasVotruba
TomasVotruba merged commit 921381a into rectorphp:main Sep 24, 2026
8 checks passed
@yoannblot
yoannblot deleted the flip-assert-more-cases branch September 24, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[PHPUnit] FlipAssertRector: support more (expected, actual) assert methods and array literal expected values

2 participants