withConsecutive() was removed in PHPUnit 10. The workarounds were ugly. PHPUnit 13 finally fixes this properly:

https://phpunit.expert/articles/better-than-withconsecutive.html?ref=mastodon

Better than withConsecutive()

I explain how PHPUnit 13's parameter set matchers finally solve the problem that made upgrading to PHPUnit 10 such a challenge.

phpunit.expert
@sebastian that's nice! Cannot wait to give it a try.

@sebastian withParameterSetsInOrder() works like a charm!

Just wondering, how can I define the return values for the different calls?

@sebastian thx. I think I see where I went in a wrong direction. I configured an array, not individual return values.

I may write a short blog post about this (when I got it working) :)