website/errors/phpunit.invalidPhpDoc.md
<?php declare(strict_types = 1);
class MyTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvidergetData
*/
public function testSomething(int $value): void
{
}
}
This error is reported by the phpstan-phpunit extension.
A PHPUnit annotation like @dataProvider, @covers, @depends, @group, or similar is missing a space between the annotation name and its value. PHPUnit requires these annotations to have a space separating the tag from its parameter. Without the space, PHPUnit will not recognise the annotation and will silently ignore it.
Add a space between the annotation name and its value:
/**
- * @dataProvidergetData
+ * @dataProvider getData
*/
public function testSomething(int $value): void
{
}