. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use Fisharebest\Webtrees\TestCase; /** * 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')); } }