Skip to content

Commit

Permalink
Adjust CI (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
shalvah committed Nov 21, 2023
1 parent 5ed94ce commit 7060e7f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.lowest.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"scripts": {
"lint": "phpstan analyse -c ./phpstan.neon src camel --memory-limit 1G",
"test": "phpunit --stop-on-failure --exclude-group dingo",
"test-ci": "phpunit --exclude-group dingo",
"test-ci": "pest --exclude-group dingo --coverage --min=80",
"test-parallel": "paratest -p16 --stop-on-failure --exclude-group dingo",
"test-parallel-ci": "paratest -p16 --exclude-group dingo"
},
Expand Down
21 changes: 18 additions & 3 deletions tests/Unit/ValidationRuleParsingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,12 @@ public function can_parse_enum_rules()
}

$results = $this->strategy->parse([
'enum' => ['required', Rule::enum(Fixtures\TestStringBackedEnum::class)],
'enum' => [
'required',
new \Illuminate\Validation\Rules\Enum(Fixtures\TestStringBackedEnum::class),
// Not supported in Laravel 8
// Rule::enum(Fixtures\TestStringBackedEnum::class)
],
]);
$this->assertEquals('string', $results['enum']['type']);
$this->assertEquals(
Expand All @@ -555,7 +560,12 @@ public function can_parse_enum_rules()


$results = $this->strategy->parse([
'enum' => ['required', Rule::enum(Fixtures\TestIntegerBackedEnum::class)],
'enum' => [
'required',
new \Illuminate\Validation\Rules\Enum(Fixtures\TestIntegerBackedEnum::class),
// Not supported in Laravel 8
// Rule::enum(Fixtures\TestIntegerBackedEnum::class)
],
]);
$this->assertEquals('integer', $results['enum']['type']);
$this->assertEquals(
Expand All @@ -568,7 +578,12 @@ public function can_parse_enum_rules()
));

$results = $this->strategy->parse([
'enum' => ['required', Rule::enum(Fixtures\TestStringBackedEnum::class)],
'enum' => [
'required',
new \Illuminate\Validation\Rules\Enum(Fixtures\TestStringBackedEnum::class),
// Not supported in Laravel 8
// Rule::enum(Fixtures\TestStringBackedEnum::class),
],
], [
'enum' => ['description' => 'A description'],
]);
Expand Down

0 comments on commit 7060e7f

Please sign in to comment.