From 375e1f2379144f12286ab8b2fbb28744775c7810 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sun, 19 Nov 2023 21:05:42 +0300 Subject: [PATCH] Fixed tests --- tests/Datasets/Locales.php | 2 +- tests/Helpers/assets.php | 9 ++++----- tests/Unit/EnumTest.php | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/Datasets/Locales.php b/tests/Datasets/Locales.php index 90fe0db..bf3c137 100644 --- a/tests/Datasets/Locales.php +++ b/tests/Datasets/Locales.php @@ -15,7 +15,7 @@ declare(strict_types=1); -use LaravelLang\Locales\Enums\Locale; +use LaravelLang\LocaleList\Locale; dataset('locales-string', fn () => Locale::values()); dataset('locales-enum', fn () => Locale::cases()); diff --git a/tests/Helpers/assets.php b/tests/Helpers/assets.php index c1a676d..50e7d0a 100644 --- a/tests/Helpers/assets.php +++ b/tests/Helpers/assets.php @@ -15,7 +15,7 @@ declare(strict_types=1); -use LaravelLang\Locales\Enums\Locale; +use LaravelLang\LocaleList\Locale; use LaravelLang\NativeCountryNames\Enums\SortBy; use LaravelLang\NativeCountryNames\Helpers\Arr; use PHPUnit\Framework\Assert; @@ -35,12 +35,11 @@ expect()->extend('toBeCompileLocales', function (SortBy $sortBy = SortBy::Value) { $result = []; - foreach (Locale::values() as $value) { - $result[$value] = sourceLocale($value)[$value]; + foreach ($this->value as $key => $value) { + $result[$key] = sourceLocale($key)[$key]; } $this->toBe(Arr::sortBy($result, $sortBy)); return $this; -} -); +}); diff --git a/tests/Unit/EnumTest.php b/tests/Unit/EnumTest.php index 266a487..c80d432 100644 --- a/tests/Unit/EnumTest.php +++ b/tests/Unit/EnumTest.php @@ -15,7 +15,7 @@ declare(strict_types=1); -use LaravelLang\Locales\Enums\Locale; +use LaravelLang\LocaleList\Locale; use LaravelLang\NativeCountryNames\Native; it('checks if the enum matches the locale value', function (Locale $locale) {