From 7060e7fdd6b713b0a37eb45671f653e18a64bfb6 Mon Sep 17 00:00:00 2001 From: Shalvah Date: Tue, 21 Nov 2023 11:21:48 +0100 Subject: [PATCH] Adjust CI (test) --- composer.lowest.json | 2 +- tests/Unit/ValidationRuleParsingTest.php | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/composer.lowest.json b/composer.lowest.json index 54a66a42..04630341 100644 --- a/composer.lowest.json +++ b/composer.lowest.json @@ -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" }, diff --git a/tests/Unit/ValidationRuleParsingTest.php b/tests/Unit/ValidationRuleParsingTest.php index 80fcf761..95765404 100644 --- a/tests/Unit/ValidationRuleParsingTest.php +++ b/tests/Unit/ValidationRuleParsingTest.php @@ -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( @@ -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( @@ -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'], ]);