michaelpetri/phpunit-consecutive-arguments

Replacement for the removed InvocationMocker::withConsecutive method.

0.3.0 2024-05-06 05:58 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