Files
AeonDumpManager/tests/Service/MySqlVariantTest.php
haylanandClaude-Bot 6094b6f49c 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>
2026-09-17 12:39:08 +02:00

25 lines
773 B
PHP

<?php declare(strict_types=1);
namespace AeonDumpManager\Tests\Service;
use AeonDumpManager\Service\MySqlVariant;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
class MySqlVariantTest extends TestCase
{
#[DataProvider('versionProvider')]
public function testIsMariaDb(string $version, bool $expected): void
{
self::assertSame($expected, MySqlVariant::isMariaDb($version));
}
public static function versionProvider(): iterable
{
yield 'plain mysql' => ['8.0.36', false];
yield 'mariadb with legacy prefix' => ['5.5.5-10.11.2-MariaDB', true];
yield 'mariadb without legacy prefix' => ['10.11.2-MariaDB', true];
yield 'mariadb lowercase' => ['10.11.2-mariadb', true];
}
}