Skip to content

Commit

Permalink
test: Fixed deprecated mismatched param name support
Browse files Browse the repository at this point in the history
`Providing invalid named argument $rule for method Sourcetoad\RuleHelper\Tests\Unit\DatabaseRuleTest::testDatabaseRules() is deprecated and will not be supported in PHPUnit 11.0.`
  • Loading branch information
erik-perri committed Apr 16, 2024
1 parent 5cd974a commit ef31dd0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/Unit/DatabaseRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static function databaseSetupProvider(): array
return [
'does not exist without column' => [
'createData' => fn() => ['email' => $this->faker->email],
'rule' => fn() => [
'createRules' => fn() => [
'email' => RuleSet::create()->exists('users'),
],
'fails' => true,
Expand All @@ -70,14 +70,14 @@ public static function databaseSetupProvider(): array

return ['email' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'email' => RuleSet::create()->exists('users'),
],
'fails' => false,
],
'does not exist with column' => [
'createData' => fn() => ['value' => $this->faker->email],
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->exists('users', 'email'),
],
'fails' => true,
Expand All @@ -93,7 +93,7 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->exists('users', 'email'),
],
'fails' => false,
Expand All @@ -109,7 +109,7 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->exists(
'users',
'email',
Expand All @@ -129,7 +129,7 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->exists(
'users',
'email',
Expand All @@ -149,14 +149,14 @@ public static function databaseSetupProvider(): array

return ['email' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'email' => RuleSet::create()->unique('users'),
],
'fails' => true,
],
'unique without column' => [
'createData' => fn() => ['email' => $this->faker->email],
'rule' => fn() => [
'createRules' => fn() => [
'email' => RuleSet::create()->unique('users'),
],
'fails' => false,
Expand All @@ -172,14 +172,14 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->unique('users', 'email'),
],
'fails' => true,
],
'unique with column' => [
'createData' => fn() => ['value' => $this->faker->email],
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->unique('users', 'email'),
],
'fails' => false,
Expand All @@ -195,7 +195,7 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->unique(
'users',
'email',
Expand All @@ -215,7 +215,7 @@ public static function databaseSetupProvider(): array

return ['value' => $email];
},
'rule' => fn() => [
'createRules' => fn() => [
'value' => RuleSet::create()->unique(
'users',
'email',
Expand Down

0 comments on commit ef31dd0

Please sign in to comment.