. */ 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 AbstractElementTest { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new RestrictionNotice('label'); } /** * @return void */ 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')); } }