. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(AbstractElement::class)] #[CoversClass(PlaceHierarchy::class)] class PlaceHierarchyTest extends AbstractElementTestCase { /** * Standard tests for all elements. */ public static function setupBeforeClass(): void { parent::setUpBeforeClass(); self::$element = new PlaceHierarchy('label'); } 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('Foo, bAr, baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); self::assertSame('Foo, Bar, Baz', self::$element->canonical(',,Foo,Bar , , Baz, ')); } }