. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; /** * Test harness for the class RestrictionNotice * * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\RestrictionNotice */ 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')); } }