Skip to content

[12.x] Add Enum support for assertJsonPath in AssertableJsonString.php #55516

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 23, 2025

Conversation

azim-kordpour
Copy link
Contributor

Hi,
To improve code readability and prevent typos, I added Enum support for assertJsonPath in this PR.

// Before
$this->postJson('book')
     ->assertJsonPath('data.status', BookingStatus::Booked->value);
// After
$this->postJson('book')
     ->assertJsonPath('data.status', BookingStatus::Booked);

@azim-kordpour
Copy link
Contributor Author

@shaedrich
Thank you for the suggestion.

@shaedrich
Copy link
Contributor

@azim-kordpour You're welcome.

@taylorotwell taylorotwell merged commit 573684f into laravel:12.x Apr 23, 2025
58 checks passed
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.

3 participants