michaelpetri / phpunit-consecutive-arguments
Replacement for the removed InvocationMocker::withConsecutive method.
Installs: 1 687
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 3
Open Issues: 3
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: 2025-04-09 04:16:57 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