test(dump): replace @dataProvider annotations with #[DataProvider] attributes
The installed PHPUnit (12.x, ahead of this plugin's ^10.0 dev constraint) no longer parses the @dataProvider PHPDoc annotation, so both tests silently ran their data-provider method with zero arguments and failed with ArgumentCountError. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace AeonDumpManager\Tests\Service;
|
||||
|
||||
use AeonDumpManager\Service\DumpFilenameParser;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class DumpFilenameParserTest extends TestCase
|
||||
@@ -29,9 +30,7 @@ class DumpFilenameParserTest extends TestCase
|
||||
self::assertEquals($dateTime, $this->parser->parse($filename));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider invalidFilenameProvider
|
||||
*/
|
||||
#[DataProvider('invalidFilenameProvider')]
|
||||
public function testParseRejectsInvalidFilenames(string $filename): void
|
||||
{
|
||||
self::assertNull($this->parser->parse($filename));
|
||||
|
||||
Reference in New Issue
Block a user