Skip to content

Commit 32b6a86

Browse files
mpywclaude
andcommitted
Fix PHPUnit 12 data provider syntax
Replace @dataProvider annotation with #[DataProvider] attribute as required by PHPUnit 12. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c775953 commit 32b6a86

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/BasicVariableAssignmentTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88
use Mpyw\LaravelMySqlSystemVariableManager\MySqlConnection;
99
use Mpyw\LaravelMySqlSystemVariableManager\Replacer;
1010
use Mpyw\LaravelMySqlSystemVariableManager\Value;
11+
use PHPUnit\Framework\Attributes\DataProvider;
1112

1213
class BasicVariableAssignmentTest extends TestCase
1314
{
1415
/**
15-
* @test
1616
* @param mixed $expectedOriginal
1717
* @param mixed $newValue
1818
* @param mixed $expectedChanged
19-
* @dataProvider provideBasicVariables
2019
*/
20+
#[DataProvider('provideBasicVariables')]
2121
public function testAssignments(string $variableName, bool $emulated, $expectedOriginal, $newValue, $expectedChanged): void
2222
{
2323
$this->{$emulated ? 'onEmulatedConnection' : 'onNativeConnection'}(function (MySqlConnection $db) use ($variableName, $expectedOriginal, $newValue, $expectedChanged): void {
@@ -28,12 +28,11 @@ public function testAssignments(string $variableName, bool $emulated, $expectedO
2828
}
2929

3030
/**
31-
* @test
3231
* @param mixed $expectedOriginal
3332
* @param mixed $newValue
3433
* @param mixed $expectedChanged
35-
* @dataProvider provideBasicVariables
3634
*/
35+
#[DataProvider('provideBasicVariables')]
3736
public function testTemporaryAssignments(string $variableName, bool $emulated, $expectedOriginal, $newValue, $expectedChanged): void
3837
{
3938
$this->{$emulated ? 'onEmulatedConnection' : 'onNativeConnection'}(function (MySqlConnection $db) use ($variableName, $expectedOriginal, $newValue, $expectedChanged): void {

0 commit comments

Comments
 (0)