Skip to content

[10.x] Adds testing helpers for Precognition - #48151

Merged
taylorotwell merged 9 commits into
laravel:10.xfrom
peterfox:precog-assertions
Aug 30, 2023
Merged

taylorotwell merged 9 commits into
laravel:10.xfrom
peterfox:precog-assertions

Conversation

@peterfox

@peterfox peterfox commented Aug 23, 2023 •

Copy link
Copy Markdown
Contributor

This should help anyone wanting to write a test for an endpoint using Precognition.

$this->usingPrecognition()
    ->get('/')
    ->assertPrecognitionSuccess();

@peterfox peterfox changed the title dds testing helpers for Precognition [10.x] Adds testing helpers for Precognition Aug 23, 2023
@timacdonald timacdonald self-assigned this Aug 24, 2023
Comment thread src/Illuminate/Testing/TestResponse.php Resolved
Comment thread tests/Testing/TestResponseTest.php Resolved
@timacdonald
timacdonald marked this pull request as draft August 24, 2023 07:32
@timacdonald

Copy link
Copy Markdown
Member

This is awesome, Peter. I've put a few suggestions in. Tomorrow I'll come in and do a good review to make sure it's good to go.

Tried to today, but my Git foo failed me...so unfortunately I just added a bunch of GitHub comments instead of just making the changes - sorry!

Let's leave this in review until I've had a chance to go over it in detail.

Thanks again. Very excited to see this.

@peterfox

Copy link
Copy Markdown
Contributor Author

@timacdonald thanks for reviewing! I've made the changes bar one that I left a comment on about asserting the response is a 204 status code.

@peterfox
peterfox requested a review from timacdonald August 24, 2023 14:25
@peterfox
peterfox marked this pull request as ready for review August 29, 2023 15:22

@timacdonald timacdonald left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, Peter!

@taylorotwell
taylorotwell merged commit 47767f6 into laravel:10.x Aug 30, 2023
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