. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(AbstractElement::class)] #[CoversClass(RestrictionNotice::class)] class RestrictionNoticeTest extends AbstractElementTestCase { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new RestrictionNotice('label'); } public function testCanonical(): void { self::assertSame('PRIVACY', self::$element->canonical('pRiVacy')); self::assertSame('NONE', self::$element->canonical('NONE')); self::assertSame('CONFIDENTIAL', self::$element->canonical('Confidential')); self::assertSame('LOCKED', self::$element->canonical(', locked ,')); self::assertSame('CONFIDENTIAL, LOCKED', self::$element->canonical('locked confidential')); self::assertSame('PRIVACY, LOCKED', self::$element->canonical('locked, privacy')); self::assertSame('NONE, LOCKED', self::$element->canonical('locked,, none')); } }