In my case, test case class has the following structure:
<?php
class MyTest extends \PHPUnit\Framework\TestCase
{
public function testOne(): string
{
// ...
return 'bar';
}
/**
* @dataProvider providerFoo
* @depends testOne
*/
public function testSecond(string $foo, string $bar): void
{
// ...
}
/**
* @return iterable<string, array{string}>
public function providerFoo(): iterable
{
return [['foo']];
}
}
In this case, testSecond() method gets $foo = 'foo' and $bar = 'bar' arguments; but Psalm reports TooFewArguments (probably ignoring dependency if data provider is set).
P.S.: Anyone please tell me how to suppress this bug until it gets fixed. Adding @psalm-suppress TooFewArguments both in provider or test method docblocks doesn't help.