Skip to content
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

Add assert sent in order assertion #400

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

DaniTulp
Copy link

In Laravel there's quite a neat assertion on the Http client called assertSentInOrder, it kind of does what it says on the tin, it allows you to check that the requests that are made are sent in the same order as you expect them.

To me this opens up quite a few testing scenarios like this:

$mockClient->assertSentInOrder([
            function (FirstRequest $request) {
                // some specific assertion on the first request + type info
                return true;
            },
            function (SecondRequest $request) {
                // some specific assertion on the second request + type info
                return true;
            },
        ])

@Sammyjo20
Copy link
Collaborator

Thanks for this PR @DaniTulp and sorry for the delay. I will be looking at this properly soon, just wanted to give you a response. I will need a little more time as I'd need to update the documentation.

@DaniTulp
Copy link
Author

@Sammyjo20 no problem, let me know if you need help with that!

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.

None yet

2 participants