michaelpetri/phpunit-consecutive-arguments

Replacement for the removed InvocationMocker::withConsecutive method.

Maintainers

Package info

github.com/michaelpetri/phpunit-consecutive-arguments

pkg:composer/michaelpetri/phpunit-consecutive-arguments

Statistics

Installs: 2 955

Dependents: 0

Suggesters: 0

Stars: 8

Open Issues: 8

0.3.2 2025-02-20 06:51 UTC

README

Replacement for the removed InvocationMocker::withConsecutive method.

Type Coverage Latest Stable Version License

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