. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(AbstractElement::class)] #[CoversClass(MultimediaFormat::class)] class MultimediaFormatTest extends AbstractElementTestCase { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new MultimediaFormat('label'); } public function testCanonical(): void { self::assertSame('JPG', self::$element->canonical('jpg')); self::assertSame('JPG', self::$element->canonical('jpeg')); self::assertSame('JPG', self::$element->canonical('JPG')); self::assertSame('JPG', self::$element->canonical('JPEG')); self::assertSame('TIF', self::$element->canonical('tif')); self::assertSame('TIF', self::$element->canonical('tiff')); self::assertSame('TIF', self::$element->canonical('TIF')); self::assertSame('TIF', self::$element->canonical('TIFF')); self::assertSame('PDF', self::$element->canonical('pdf')); } }