Skip to content

Replacement for the removed InvocationMocker::withConsecutive method.

License

Notifications You must be signed in to change notification settings

michaelpetri/phpunit-consecutive-arguments

Repository files navigation

PHPUnit Consecutive Arguments

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