. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; /** * Test harness for the class LanguageId * * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\LanguageId */ class LanguageIdTest extends AbstractElementTest { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); static::$element = new LanguageId('label'); } /** * @return void */ public function testCanonical(): void { self::assertSame('ENGLISH', self::$element->canonical("\t English\t ")); self::assertSame('KLINGON', self::$element->canonical('kLiNgOn')); self::assertSame('ANGLO-SAXON', self::$element->canonical('anglo-saxon')); self::assertSame('CATALAN_SPN', self::$element->canonical('CATALAN_SPN')); } }