. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; /** * Test harness for the class MultimediaFormat * * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\MultimediaFormat */ class MultimediaFormatTest extends AbstractElementTest { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new MultimediaFormat('label'); } /** * @return void */ public function testCanonical(): void { self::assertSame('jpg', self::$element->canonical("file.jpg")); self::assertSame('jpg', self::$element->canonical("file.jpeg")); self::assertSame('jpg', self::$element->canonical("FILE.JPG")); self::assertSame('jpg', self::$element->canonical("FILE.JPEG")); self::assertSame('tif', self::$element->canonical("file.tif")); self::assertSame('tif', self::$element->canonical("file.tiff")); self::assertSame('tif', self::$element->canonical("FILE.TIF")); self::assertSame('tif', self::$element->canonical("FILE.TIFF")); self::assertSame('pdf', self::$element->canonical("document.pdf")); } }