. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; /** * Test harness for the class NoteStructure * * @covers \Fisharebest\Webtrees\Elements\AbstractElement * @covers \Fisharebest\Webtrees\Elements\NoteStructure */ class NoteStructureTest extends AbstractElementTest { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new NoteStructure('label'); } /** * @return void */ public function testCanonical(): void { self::assertSame('Foo bAr baZ', self::$element->canonical("Foo bAr baZ")); self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); self::assertSame("\nFoo \n\n bAr \n baZ\n", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); } }