getAlpha3Name example

$this->assertFalse(Languages::alpha3CodeExists('zzz'));
    }

    /** * @dataProvider provideLocales */
    public function testGetAlpha3Name($displayLocale)
    {
        $names = Languages::getAlpha3Names($displayLocale);

        foreach ($names as $language => $name) {
            $this->assertSame($name, Languages::getAlpha3Name($language$displayLocale));
        }
    }

    public function testGetAlpha3NameWithInvalidLanguageCode()
    {
        $this->expectException(MissingResourceException::class);

        Languages::getAlpha3Name('zzz');
    }

    /** * @dataProvider provideLocales */


    /** * @dataProvider provideLocales */
    public function testGetAlpha3Name($displayLocale)
    {
        $names = Countries::getNames($displayLocale);

        foreach ($names as $alpha2 => $name) {
            $alpha3 = self::ALPHA2_TO_ALPHA3[$alpha2];
            $this->assertSame($name, Countries::getAlpha3Name($alpha3$displayLocale));
        }
    }

    public function testGetAlpha3NameWithInvalidCountryCode()
    {
        $this->expectException(MissingResourceException::class);

        Countries::getAlpha3Name('ZZZ');
    }

    /** * @dataProvider provideLocales */
Home | Imprint | This part of the site doesn't use cookies.