. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class CensusOfDenmark1835 */ class CensusOfDenmark1835Test extends TestCase { /** * Test the census place and date * * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 * * @return void */ public function testPlaceAndDate(): void { $census = new CensusOfDenmark1835(); self::assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); self::assertSame('18 FEB 1835', $census->censusDate()); } /** * Test the census columns * * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testColumns(): void { $census = new CensusOfDenmark1835(); $columns = $census->columns(); self::assertCount(4, $columns); self::assertInstanceOf(CensusColumnFullName::class, $columns[0]); self::assertInstanceOf(CensusColumnAge::class, $columns[1]); self::assertInstanceOf(CensusColumnConditionDanish::class, $columns[2]); self::assertInstanceOf(CensusColumnRelationToHead::class, $columns[3]); self::assertSame('Navn', $columns[0]->abbreviation()); self::assertSame('Alder', $columns[1]->abbreviation()); self::assertSame('Civilstand', $columns[2]->abbreviation()); self::assertSame('Stilling i familien', $columns[3]->abbreviation()); self::assertSame('', $columns[0]->title()); self::assertSame('', $columns[1]->title()); self::assertSame('', $columns[2]->title()); self::assertSame('', $columns[3]->title()); } }