Skip to content

feat: Better trait and authenticator expectations - #32

Merged
Sammyjo20 merged 2 commits into
masterfrom
better-trait-and-authenticator-expectations
Nov 17, 2026
Merged

Sammyjo20 merged 2 commits into
masterfrom
better-trait-and-authenticator-expectations

Conversation

@Sammyjo20

@Sammyjo20 Sammyjo20 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Why / What
Previously we used toUse on traits and authenticators. This only checked if the class was imported or appeared in a docblock. During testing, we removed the trait being used and the test still passed. We've now made this more robust by using toUseTrait and then use a custom expectation handler for authenticators to check they are actually being used properly.

Checklist

  • composer test passes locally (Pint, Rector, PHPStan, type coverage, Pest)
  • Coding style: composer lint
  • Commits are meaningful and follow SemVer-friendly changes

@JonPurvis JonPurvis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👍

@Sammyjo20 Sammyjo20 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

@Sammyjo20
Sammyjo20 merged commit 8fc0315 into master Nov 17, 2026
6 checks passed
@Sammyjo20
Sammyjo20 deleted the better-trait-and-authenticator-expectations branch November 17, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants