michaelpetri / phpunit-consecutive-arguments
Replacement for the removed InvocationMocker::withConsecutive method.
Package info
github.com/michaelpetri/phpunit-consecutive-arguments
pkg:composer/michaelpetri/phpunit-consecutive-arguments
0.3.2
2025-02-20 06:51 UTC
Requires
- php: ~8.3.0 || ~8.4.0
- phpunit/phpunit: ^10.5.45 || ^11.5.7 || ^12.0.2
Requires (Dev)
- php-cs-fixer/shim: ^3.68.5
- psalm/phar: ^6.5.1
- rector/rector: ^2.0.9
- roave/security-advisories: dev-latest
Conflicts
This package is auto-updated.
Last update: 2026-05-30 05:06:15 UTC
README
Replacement for the removed InvocationMocker::withConsecutive method.
Installation
composer require michaelpetri/phpunit-consecutive-arguments
Example
$mock ->expects(self::exactly(\count(2))) ->method('someMethod') ->with( ...ConsecutiveArguments::of( ['1.1', '1.2'], ['2.1', '2.2'], );
See Tests for more examples