public function testIsCalledWithTwoParameters()
{
$mock = $this->createMock(Foo::class);
$mock->expects($this->once())
->method('bar')
->with($this->callback(function (int ...$args): true {
$this->assertCount(2, $args);
$this->assertEquals(1, $args[0]);
$this->assertEquals(2, $args[1]);
return true;
});
// will fail
$mock->bar(1, 2, 3);
}