. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\TestCase; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(CensusOfDenmark1803::class)] #[CoversClass(AbstractCensusColumn::class)] class CensusOfDenmark1803Test extends TestCase { /** * Test the census place and date */ public function testPlaceAndDate(): void { $census = new CensusOfDenmark1803(); self::assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); self::assertSame('01 FEB 1803', $census->censusDate()); } /** * Test the census columns */ public function testColumns(): void { $census = new CensusOfDenmark1803(); $columns = $census->columns(); self::assertCount(5, $columns); self::assertInstanceOf(CensusColumnFullName::class, $columns[0]); self::assertInstanceOf(CensusColumnRelationToHead::class, $columns[1]); self::assertInstanceOf(CensusColumnAge::class, $columns[2]); self::assertInstanceOf(CensusColumnConditionDanish::class, $columns[3]); self::assertInstanceOf(CensusColumnOccupation::class, $columns[4]); self::assertSame('Navn', $columns[0]->abbreviation()); self::assertSame('Stilling i familien', $columns[1]->abbreviation()); self::assertSame('Alder', $columns[2]->abbreviation()); self::assertSame('Civilstand', $columns[3]->abbreviation()); self::assertSame('Erhverv', $columns[4]->abbreviation()); self::assertSame('', $columns[0]->title()); self::assertSame('', $columns[1]->title()); self::assertSame('', $columns[2]->title()); self::assertSame('', $columns[3]->title()); self::assertSame('', $columns[4]->title()); } }