diff --git a/dev/DataSource/Language/ISO639_1_Alpha_2_Source.php b/dev/DataSource/Language/ISO639_1_Alpha_2_Source.php index 8476cb09..9aeac3e3 100644 --- a/dev/DataSource/Language/ISO639_1_Alpha_2_Source.php +++ b/dev/DataSource/Language/ISO639_1_Alpha_2_Source.php @@ -4,7 +4,7 @@ namespace PrinsFrank\Standards\Dev\DataSource\Language; use PrinsFrank\Standards\Dev\DataSource\HtmlDataSource; -use PrinsFrank\Standards\Language\ISO639_1_Alpha_2; +use PrinsFrank\Standards\Language\LanguageAlpha2; use Symfony\Component\Panther\Client; use Symfony\Component\Panther\DomCrawler\Crawler; @@ -42,7 +42,7 @@ public static function transformValue(string $value): string|int|null public static function getSpecFQN(): string { - return ISO639_1_Alpha_2::class; + return LanguageAlpha2::class; } public static function getKeyEnumFQN(): string diff --git a/dev/DataSource/Language/ISO639_2_Alpha_3_Bibliographic_Source.php b/dev/DataSource/Language/ISO639_2_Alpha_3_Bibliographic_Source.php index b05201dc..d170d782 100644 --- a/dev/DataSource/Language/ISO639_2_Alpha_3_Bibliographic_Source.php +++ b/dev/DataSource/Language/ISO639_2_Alpha_3_Bibliographic_Source.php @@ -4,7 +4,7 @@ namespace PrinsFrank\Standards\Dev\DataSource\Language; use PrinsFrank\Standards\Dev\DataSource\HtmlDataSource; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Bibliographic; +use PrinsFrank\Standards\Language\LanguageAlpha3Bibliographic; use Symfony\Component\Panther\Client; use Symfony\Component\Panther\DomCrawler\Crawler; @@ -48,7 +48,7 @@ public static function transformValue(string $value): string|int|null public static function getSpecFQN(): string { - return ISO639_2_Alpha_3_Bibliographic::class; + return LanguageAlpha3Bibliographic::class; } public static function getKeyEnumFQN(): string diff --git a/dev/DataSource/Language/ISO639_2_Alpha_3_Common_Source.php b/dev/DataSource/Language/ISO639_2_Alpha_3_Common_Source.php index b87c4001..764aa1a9 100644 --- a/dev/DataSource/Language/ISO639_2_Alpha_3_Common_Source.php +++ b/dev/DataSource/Language/ISO639_2_Alpha_3_Common_Source.php @@ -4,7 +4,7 @@ namespace PrinsFrank\Standards\Dev\DataSource\Language; use PrinsFrank\Standards\Dev\DataSource\HtmlDataSource; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Common; +use PrinsFrank\Standards\Language\LanguageAlpha3Common; use Symfony\Component\Panther\Client; use Symfony\Component\Panther\DomCrawler\Crawler; @@ -46,7 +46,7 @@ public static function transformValue(string $value): string|int|null public static function getSpecFQN(): string { - return ISO639_2_Alpha_3_Common::class; + return LanguageAlpha3Common::class; } public static function getKeyEnumFQN(): string diff --git a/dev/DataSource/Language/ISO639_2_Alpha_3_Terminology_Source.php b/dev/DataSource/Language/ISO639_2_Alpha_3_Terminology_Source.php index 83d5fb2e..7459325c 100644 --- a/dev/DataSource/Language/ISO639_2_Alpha_3_Terminology_Source.php +++ b/dev/DataSource/Language/ISO639_2_Alpha_3_Terminology_Source.php @@ -4,7 +4,7 @@ namespace PrinsFrank\Standards\Dev\DataSource\Language; use PrinsFrank\Standards\Dev\DataSource\HtmlDataSource; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Terminology; +use PrinsFrank\Standards\Language\LanguageAlpha3Terminology; use Symfony\Component\Panther\Client; use Symfony\Component\Panther\DomCrawler\Crawler; @@ -48,7 +48,7 @@ public static function transformValue(string $value): string|int|null public static function getSpecFQN(): string { - return ISO639_2_Alpha_3_Terminology::class; + return LanguageAlpha3Terminology::class; } public static function getKeyEnumFQN(): string diff --git a/dev/DataSource/Language/ISO639_Name_Source.php b/dev/DataSource/Language/ISO639_Name_Source.php index fcf556b0..1c7b841e 100644 --- a/dev/DataSource/Language/ISO639_Name_Source.php +++ b/dev/DataSource/Language/ISO639_Name_Source.php @@ -4,8 +4,8 @@ namespace PrinsFrank\Standards\Dev\DataSource\Language; use PrinsFrank\Standards\Dev\DataSource\HtmlDataSource; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Common; -use PrinsFrank\Standards\Language\ISO639_Name; +use PrinsFrank\Standards\Language\LanguageAlpha3Common; +use PrinsFrank\Standards\Language\LanguageName; use Symfony\Component\Panther\Client; use Symfony\Component\Panther\DomCrawler\Crawler; @@ -47,12 +47,12 @@ public static function transformValue(string $value): string|int|null public static function getSpecFQN(): string { - return ISO639_Name::class; + return LanguageName::class; } public static function getKeyEnumFQN(): string { - return ISO639_2_Alpha_3_Common::class; + return LanguageAlpha3Common::class; } public static function afterPageLoad(Client $client, Crawler $crawler): void diff --git a/src/Language/ISO639_1_Alpha_2.php b/src/Language/LanguageAlpha2.php similarity index 96% rename from src/Language/ISO639_1_Alpha_2.php rename to src/Language/LanguageAlpha2.php index 5b4b63e4..7e60345a 100644 --- a/src/Language/ISO639_1_Alpha_2.php +++ b/src/Language/LanguageAlpha2.php @@ -9,7 +9,7 @@ * @source https://www.iso.org/iso-639-language-codes.html * @source http://www.loc.gov/standards/iso639-2/php/code_list.php */ -enum ISO639_1_Alpha_2: string +enum LanguageAlpha2: string { case Abkhazian = 'ab'; case Afar = 'aa'; @@ -196,19 +196,19 @@ enum ISO639_1_Alpha_2: string case Zhuang_Chuang = 'za'; case Zulu = 'zu'; - public function toISO639_2_Alpha_3_Bibliographic(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Bibliographic|null + public function toLanguageAlpha3Bibliographic(): LanguageAlpha3Common|LanguageAlpha3Bibliographic|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Bibliographic::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Bibliographic::class, $this->name) ?? null; } - public function toISO639_2_Alpha_3_Terminology(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Terminology|null + public function toLanguageAlpha3Terminology(): LanguageAlpha3Common|LanguageAlpha3Terminology|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Terminology::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Terminology::class, $this->name) ?? null; } - public function toISO639_Name(): ISO639_Name + public function toLanguageName(): LanguageName { - return BackedEnum::fromKey(ISO639_Name::class, $this->name); + return BackedEnum::fromKey(LanguageName::class, $this->name); } public function upperCaseValue(): string diff --git a/src/Language/ISO639_2_Alpha_3_Bibliographic.php b/src/Language/LanguageAlpha3Bibliographic.php similarity index 69% rename from src/Language/ISO639_2_Alpha_3_Bibliographic.php rename to src/Language/LanguageAlpha3Bibliographic.php index 2cc56235..1ab5b27e 100644 --- a/src/Language/ISO639_2_Alpha_3_Bibliographic.php +++ b/src/Language/LanguageAlpha3Bibliographic.php @@ -9,7 +9,7 @@ * @source https://www.iso.org/iso-639-language-codes.html * @source http://www.loc.gov/standards/iso639-2/php/code_list.php */ -enum ISO639_2_Alpha_3_Bibliographic: string +enum LanguageAlpha3Bibliographic: string { case Albanian = 'alb'; case Armenian = 'arm'; @@ -32,19 +32,19 @@ enum ISO639_2_Alpha_3_Bibliographic: string case Tibetan = 'tib'; case Welsh = 'wel'; - public function toISO639_2_Alpha_3_Terminology(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Terminology|null + public function toLanguageAlpha3Terminology(): LanguageAlpha3Common|LanguageAlpha3Terminology|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Terminology::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Terminology::class, $this->name) ?? null; } - public function toISO639_1_Alpha_2(): ISO639_1_Alpha_2|null + public function toLanguageAlpha2(): LanguageAlpha2|null { - return BackedEnum::tryFromKey(ISO639_1_Alpha_2::class, $this->name); + return BackedEnum::tryFromKey(LanguageAlpha2::class, $this->name); } - public function toISO639_Name(): ISO639_Name + public function toLanguageName(): LanguageName { - return BackedEnum::fromKey(ISO639_Name::class, $this->name); + return BackedEnum::fromKey(LanguageName::class, $this->name); } public function upperCaseValue(): string diff --git a/src/Language/ISO639_2_Alpha_3_Common.php b/src/Language/LanguageAlpha3Common.php similarity index 99% rename from src/Language/ISO639_2_Alpha_3_Common.php rename to src/Language/LanguageAlpha3Common.php index 5411f65a..124f5f1d 100644 --- a/src/Language/ISO639_2_Alpha_3_Common.php +++ b/src/Language/LanguageAlpha3Common.php @@ -9,7 +9,7 @@ * @source https://www.iso.org/iso-639-language-codes.html * @source http://www.loc.gov/standards/iso639-2/php/code_list.php */ -enum ISO639_2_Alpha_3_Common: string +enum LanguageAlpha3Common: string { case Abkhazian = 'abk'; case Achinese = 'ace'; @@ -478,14 +478,14 @@ enum ISO639_2_Alpha_3_Common: string case Zulu = 'zul'; case Zuni = 'zun'; - public function toISO639_1_Alpha_2(): ISO639_1_Alpha_2|null + public function toLanguageAlpha2(): LanguageAlpha2|null { - return BackedEnum::tryFromKey(ISO639_1_Alpha_2::class, $this->name); + return BackedEnum::tryFromKey(LanguageAlpha2::class, $this->name); } - public function toISO639_Name(): ISO639_Name + public function toLanguageName(): LanguageName { - return BackedEnum::fromKey(ISO639_Name::class, $this->name); + return BackedEnum::fromKey(LanguageName::class, $this->name); } public function upperCaseValue(): string diff --git a/src/Language/ISO639_2_Alpha_3_Terminology.php b/src/Language/LanguageAlpha3Terminology.php similarity index 69% rename from src/Language/ISO639_2_Alpha_3_Terminology.php rename to src/Language/LanguageAlpha3Terminology.php index ec5f42d6..b1854818 100644 --- a/src/Language/ISO639_2_Alpha_3_Terminology.php +++ b/src/Language/LanguageAlpha3Terminology.php @@ -9,7 +9,7 @@ * @source https://www.iso.org/iso-639-language-codes.html * @source http://www.loc.gov/standards/iso639-2/php/code_list.php */ -enum ISO639_2_Alpha_3_Terminology: string +enum LanguageAlpha3Terminology: string { case Albanian = 'sqi'; case Armenian = 'hye'; @@ -32,19 +32,19 @@ enum ISO639_2_Alpha_3_Terminology: string case Tibetan = 'bod'; case Welsh = 'cym'; - public function toISO639_2_Alpha_3_Bibliographic(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Bibliographic|null + public function toLanguageAlpha3Bibliographic(): LanguageAlpha3Common|LanguageAlpha3Bibliographic|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Bibliographic::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Bibliographic::class, $this->name) ?? null; } - public function toISO639_1_Alpha_2(): ISO639_1_Alpha_2|null + public function toLanguageAlpha2(): LanguageAlpha2|null { - return BackedEnum::tryFromKey(ISO639_1_Alpha_2::class, $this->name); + return BackedEnum::tryFromKey(LanguageAlpha2::class, $this->name); } - public function toISO639_Name(): ISO639_Name + public function toLanguageName(): LanguageName { - return BackedEnum::fromKey(ISO639_Name::class, $this->name); + return BackedEnum::fromKey(LanguageName::class, $this->name); } public function upperCaseValue(): string diff --git a/src/Language/ISO639_Name.php b/src/Language/LanguageName.php similarity index 98% rename from src/Language/ISO639_Name.php rename to src/Language/LanguageName.php index 4ecd9768..cd9b69d1 100644 --- a/src/Language/ISO639_Name.php +++ b/src/Language/LanguageName.php @@ -9,7 +9,7 @@ * @source https://www.iso.org/iso-639-language-codes.html * @source http://www.loc.gov/standards/iso639-2/php/code_list.php */ -enum ISO639_Name: string +enum LanguageName: string { case Abkhazian = 'Abkhazian'; case Achinese = 'Achinese'; @@ -498,18 +498,18 @@ enum ISO639_Name: string case Zulu = 'Zulu'; case Zuni = 'Zuni'; - public function toISO639_1_Alpha_2(): ISO639_1_Alpha_2|null + public function toLanguageAlpha2(): LanguageAlpha2|null { - return BackedEnum::tryFromKey(ISO639_1_Alpha_2::class, $this->name); + return BackedEnum::tryFromKey(LanguageAlpha2::class, $this->name); } - public function toISO639_2_Alpha_3_Bibliographic(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Bibliographic|null + public function toLanguageAlpha3Bibliographic(): LanguageAlpha3Common|LanguageAlpha3Bibliographic|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Bibliographic::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Bibliographic::class, $this->name) ?? null; } - public function toISO639_2_Alpha_3_Terminology(): ISO639_2_Alpha_3_Common|ISO639_2_Alpha_3_Terminology|null + public function toLanguageAlpha3Terminology(): LanguageAlpha3Common|LanguageAlpha3Terminology|null { - return BackedEnum::tryFromKey(ISO639_2_Alpha_3_Common::class, $this->name) ?? BackedEnum::tryFromKey(ISO639_2_Alpha_3_Terminology::class, $this->name) ?? null; + return BackedEnum::tryFromKey(LanguageAlpha3Common::class, $this->name) ?? BackedEnum::tryFromKey(LanguageAlpha3Terminology::class, $this->name) ?? null; } } diff --git a/tests/Unit/Language/ISO639_1_Alpha_2Test.php b/tests/Unit/Language/ISO639_1_Alpha_2Test.php index d7c19212..6b979985 100644 --- a/tests/Unit/Language/ISO639_1_Alpha_2Test.php +++ b/tests/Unit/Language/ISO639_1_Alpha_2Test.php @@ -4,46 +4,46 @@ namespace PrinsFrank\Standards\Tests\Unit\Language; use PHPUnit\Framework\TestCase; -use PrinsFrank\Standards\Language\ISO639_1_Alpha_2; +use PrinsFrank\Standards\Language\LanguageAlpha2; /** - * @coversDefaultClass \PrinsFrank\Standards\Language\ISO639_1_Alpha_2 + * @coversDefaultClass \PrinsFrank\Standards\Language\LanguageAlpha2 */ class ISO639_1_Alpha_2Test extends TestCase { /** - * @covers ::toISO639_2_Alpha_3_Bibliographic + * @covers ::toLanguageAlpha3Bibliographic */ public function testAllCasesCanBeConvertedToToISO392_2Bibliographic(): void { - $cases = ISO639_1_Alpha_2::cases(); + $cases = LanguageAlpha2::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Bibliographic()); + static::assertNotNull($case->toLanguageAlpha3Bibliographic()); } } /** - * @covers ::toISO639_2_Alpha_3_Terminology + * @covers ::toLanguageAlpha3Terminology */ public function testAllCasesCanBeConvertedToISO392_2Terminology(): void { - $cases = ISO639_1_Alpha_2::cases(); + $cases = LanguageAlpha2::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Terminology()); + static::assertNotNull($case->toLanguageAlpha3Terminology()); } } /** - * @covers ::toISO639_Name + * @covers ::toLanguageName */ public function testAllCasesCanBeConvertedToISO392_Name(): void { - $cases = ISO639_1_Alpha_2::cases(); + $cases = LanguageAlpha2::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_Name()); + static::assertNotNull($case->toLanguageName()); } } @@ -52,6 +52,6 @@ public function testAllCasesCanBeConvertedToISO392_Name(): void */ public function testUpperCaseValue(): void { - static::assertSame('AB', ISO639_1_Alpha_2::Abkhazian->upperCaseValue()); + static::assertSame('AB', LanguageAlpha2::Abkhazian->upperCaseValue()); } } diff --git a/tests/Unit/Language/ISO639_2_Alpha_3BibliographicTest.php b/tests/Unit/Language/ISO639_2_Alpha_3BibliographicTest.php index 954b90a8..a5041d17 100644 --- a/tests/Unit/Language/ISO639_2_Alpha_3BibliographicTest.php +++ b/tests/Unit/Language/ISO639_2_Alpha_3BibliographicTest.php @@ -4,46 +4,46 @@ namespace PrinsFrank\Standards\Tests\Unit\Language; use PHPUnit\Framework\TestCase; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Bibliographic; +use PrinsFrank\Standards\Language\LanguageAlpha3Bibliographic; /** - * @coversDefaultClass \PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Bibliographic + * @coversDefaultClass \PrinsFrank\Standards\Language\LanguageAlpha3Bibliographic */ class ISO639_2_Alpha_3BibliographicTest extends TestCase { /** - * @covers ::toISO639_1_Alpha_2 + * @covers ::toLanguageAlpha2 */ public function testAllCasesCanBeConvertedToISO639_1(): void { - $cases = ISO639_2_Alpha_3_Bibliographic::cases(); + $cases = LanguageAlpha3Bibliographic::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_1_Alpha_2()); + static::assertNotNull($case->toLanguageAlpha2()); } } /** - * @covers ::toISO639_2_Alpha_3_Terminology + * @covers ::toLanguageAlpha3Terminology */ public function testAllCasesCanBeConvertedToISO639_2_Terminology(): void { - $cases = ISO639_2_Alpha_3_Bibliographic::cases(); + $cases = LanguageAlpha3Bibliographic::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Terminology()); + static::assertNotNull($case->toLanguageAlpha3Terminology()); } } /** - * @covers ::toISO639_Name + * @covers ::toLanguageName */ public function testAllCasesCanBeConvertedToISO639_Name(): void { - $cases = ISO639_2_Alpha_3_Bibliographic::cases(); + $cases = LanguageAlpha3Bibliographic::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_Name()); + static::assertNotNull($case->toLanguageName()); } } @@ -52,6 +52,6 @@ public function testAllCasesCanBeConvertedToISO639_Name(): void */ public function testUpperCaseValue(): void { - static::assertSame('ALB', ISO639_2_Alpha_3_Bibliographic::Albanian->upperCaseValue()); + static::assertSame('ALB', LanguageAlpha3Bibliographic::Albanian->upperCaseValue()); } } diff --git a/tests/Unit/Language/ISO639_2_Alpha_3CommonTest.php b/tests/Unit/Language/ISO639_2_Alpha_3CommonTest.php index 78778f2d..df17da01 100644 --- a/tests/Unit/Language/ISO639_2_Alpha_3CommonTest.php +++ b/tests/Unit/Language/ISO639_2_Alpha_3CommonTest.php @@ -4,35 +4,35 @@ namespace PrinsFrank\Standards\Tests\Unit\Language; use PHPUnit\Framework\TestCase; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Common; +use PrinsFrank\Standards\Language\LanguageAlpha3Common; /** - * @coversDefaultClass \PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Common + * @coversDefaultClass \PrinsFrank\Standards\Language\LanguageAlpha3Common */ class ISO639_2_Alpha_3CommonTest extends TestCase { /** - * @covers ::toISO639_1_Alpha_2 + * @covers ::toLanguageAlpha2 */ public function testSomeCasesCanBeConvertedToISO639_1_Alpha2(): void { - $cases = ISO639_2_Alpha_3_Common::cases(); + $cases = LanguageAlpha3Common::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - $case->toISO639_1_Alpha_2(); + $case->toLanguageAlpha2(); $this->addToAssertionCount(1); } } /** - * @covers ::toISO639_Name + * @covers ::toLanguageName */ public function testAllCasesCanBeConvertedToISO639_Name(): void { - $cases = ISO639_2_Alpha_3_Common::cases(); + $cases = LanguageAlpha3Common::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_Name()); + static::assertNotNull($case->toLanguageName()); } } @@ -41,6 +41,6 @@ public function testAllCasesCanBeConvertedToISO639_Name(): void */ public function testUpperCaseValue(): void { - static::assertSame('ABK', ISO639_2_Alpha_3_Common::Abkhazian->upperCaseValue()); + static::assertSame('ABK', LanguageAlpha3Common::Abkhazian->upperCaseValue()); } } diff --git a/tests/Unit/Language/ISO639_2_Alpha_3TerminologyTest.php b/tests/Unit/Language/ISO639_2_Alpha_3TerminologyTest.php index 92b4af95..20225666 100644 --- a/tests/Unit/Language/ISO639_2_Alpha_3TerminologyTest.php +++ b/tests/Unit/Language/ISO639_2_Alpha_3TerminologyTest.php @@ -4,46 +4,46 @@ namespace PrinsFrank\Standards\Tests\Unit\Language; use PHPUnit\Framework\TestCase; -use PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Terminology; +use PrinsFrank\Standards\Language\LanguageAlpha3Terminology; /** - * @coversDefaultClass \PrinsFrank\Standards\Language\ISO639_2_Alpha_3_Terminology + * @coversDefaultClass \PrinsFrank\Standards\Language\LanguageAlpha3Terminology */ class ISO639_2_Alpha_3TerminologyTest extends TestCase { /** - * @covers ::toISO639_1_Alpha_2 + * @covers ::toLanguageAlpha2 */ public function testAllCasesCanBeConvertedToISO639_1(): void { - $cases = ISO639_2_Alpha_3_Terminology::cases(); + $cases = LanguageAlpha3Terminology::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_1_Alpha_2()); + static::assertNotNull($case->toLanguageAlpha2()); } } /** - * @covers ::toISO639_2_Alpha_3_Bibliographic + * @covers ::toLanguageAlpha3Bibliographic */ public function testAllCasesCanBeConvertedToBibiliographical(): void { - $cases = ISO639_2_Alpha_3_Terminology::cases(); + $cases = LanguageAlpha3Terminology::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Bibliographic()); + static::assertNotNull($case->toLanguageAlpha3Bibliographic()); } } /** - * @covers ::toISO639_Name + * @covers ::toLanguageName */ public function testAllCasesCanBeConvertedToISO639_Name(): void { - $cases = ISO639_2_Alpha_3_Terminology::cases(); + $cases = LanguageAlpha3Terminology::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_Name()); + static::assertNotNull($case->toLanguageName()); } } @@ -52,6 +52,6 @@ public function testAllCasesCanBeConvertedToISO639_Name(): void */ public function testUpperCaseValue(): void { - static::assertSame('SQI', ISO639_2_Alpha_3_Terminology::Albanian->upperCaseValue()); + static::assertSame('SQI', LanguageAlpha3Terminology::Albanian->upperCaseValue()); } } diff --git a/tests/Unit/Language/ISO639_NameTest.php b/tests/Unit/Language/ISO639_NameTest.php index b59a6155..23d972c5 100644 --- a/tests/Unit/Language/ISO639_NameTest.php +++ b/tests/Unit/Language/ISO639_NameTest.php @@ -4,46 +4,46 @@ namespace Language; use PHPUnit\Framework\TestCase; -use PrinsFrank\Standards\Language\ISO639_Name; +use PrinsFrank\Standards\Language\LanguageName; /** - * @coversDefaultClass \PrinsFrank\Standards\Language\ISO639_Name + * @coversDefaultClass \PrinsFrank\Standards\Language\LanguageName */ class ISO639_NameTest extends TestCase { /** - * @covers ::toISO639_2_Alpha_3_Bibliographic + * @covers ::toLanguageAlpha3Bibliographic */ public function testAllCasesCanBeConvertedToToISO392_2Bibliographic(): void { - $cases = ISO639_Name::cases(); + $cases = LanguageName::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Bibliographic()); + static::assertNotNull($case->toLanguageAlpha3Bibliographic()); } } /** - * @covers ::toISO639_2_Alpha_3_Terminology + * @covers ::toLanguageAlpha3Terminology */ public function testAllCasesCanBeConvertedToISO392_2Terminology(): void { - $cases = ISO639_Name::cases(); + $cases = LanguageName::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - static::assertNotNull($case->toISO639_2_Alpha_3_Terminology()); + static::assertNotNull($case->toLanguageAlpha3Terminology()); } } /** - * @covers ::toISO639_1_Alpha_2 + * @covers ::toLanguageAlpha2 */ public function testSomeCasesCanBeConvertedToISO639_1_Alpha2(): void { - $cases = ISO639_Name::cases(); + $cases = LanguageName::cases(); static::assertNotEmpty($cases); foreach ($cases as $case) { - $case->toISO639_1_Alpha_2(); + $case->toLanguageAlpha2(); } } }