Bug report
hey there 👋
I think I found an issue within PHPUnit tests, using the Depends and DataProvider attribute on the same test method.
public function testIndexing(): IdsCollection
{
$ids = new IdsCollection();
// ...
return $ids;
}
/**
* @param list<string> $config
* @param list<string> $expectedProducts
*/
#[Depends('testIndexing')]
#[DataProvider('providerSearchCases')]
public function testSearch(array $config, string $term, array $expectedProducts, IdsCollection $ids): void
{
// ...
}
/**
* @return \Generator<string, array{list<string>, string, list<string>}>
*/
public static function providerSearchCases(): \Generator
{
yield 'search for manufacturer' => [
['name', 'description', 'customSearchKeywords', 'manufacturer.name'],
'Shopware',
['product-4'],
];
// and more
}
error:
Method Shopware\TestClassName::testSearch() invoked with 3 parameters, 4 required.
🪪 arguments.count
Unfortunately I cannot provide a playground code snippet, as PHPUnit is not available there. I also don't know, if this is a problem of the PHPUnit extension.
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
PHPStan helps me everyday to be the last stand against AI slop 😁
Bug report
hey there 👋
I think I found an issue within PHPUnit tests, using the
DependsandDataProviderattribute on the same test method.error:
Unfortunately I cannot provide a playground code snippet, as PHPUnit is not available there. I also don't know, if this is a problem of the PHPUnit extension.
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
PHPStan helps me everyday to be the last stand against AI slop 😁