. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class CensusOfCzechRepublic1890 */ class CensusOfCzechRepublic1890Test extends TestCase { /** * Test the census place and date * * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 * * @return void */ public function testPlaceAndDate(): void { $census = new CensusOfCzechRepublic1890(); self::assertSame('Česko', $census->censusPlace()); self::assertSame('31 DEC 1890', $census->censusDate()); } /** * Test the census columns * * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testColumns(): void { $census = new CensusOfCzechRepublic1890(); $columns = $census->columns(); self::assertCount(13, $columns); self::assertInstanceOf(CensusColumnFullName::class, $columns[0]); self::assertInstanceOf(CensusColumnRelationToHead::class, $columns[1]); self::assertInstanceOf(CensusColumnSexMZ::class, $columns[2]); self::assertInstanceOf(CensusColumnBirthDaySlashMonthYear::class, $columns[3]); self::assertInstanceOf(CensusColumnBirthPlace::class, $columns[4]); self::assertInstanceOf(CensusColumnNull::class, $columns[5]); self::assertInstanceOf(CensusColumnReligion::class, $columns[6]); self::assertInstanceOf(CensusColumnNull::class, $columns[7]); self::assertInstanceOf(CensusColumnNull::class, $columns[8]); self::assertInstanceOf(CensusColumnOccupation::class, $columns[9]); self::assertInstanceOf(CensusColumnNull::class, $columns[10]); self::assertInstanceOf(CensusColumnNull::class, $columns[11]); self::assertInstanceOf(CensusColumnNull::class, $columns[12]); self::assertSame('Jméno', $columns[0]->abbreviation()); self::assertSame('Vztah', $columns[1]->abbreviation()); self::assertSame('Pohlaví', $columns[2]->abbreviation()); self::assertSame('Narození', $columns[3]->abbreviation()); self::assertSame('Rodiště', $columns[4]->abbreviation()); self::assertSame('Přísluší', $columns[5]->abbreviation()); self::assertSame('Vyznání', $columns[6]->abbreviation()); self::assertSame('Stav', $columns[7]->abbreviation()); self::assertSame('Jazyk', $columns[8]->abbreviation()); self::assertSame('Povolání', $columns[9]->abbreviation()); self::assertSame('Postavení', $columns[10]->abbreviation()); self::assertSame('Gramotnost', $columns[11]->abbreviation()); self::assertSame('Druh pobytu', $columns[12]->abbreviation()); self::assertSame('', $columns[0]->title()); self::assertSame('', $columns[1]->title()); self::assertSame('', $columns[2]->title()); self::assertSame('Datum narození', $columns[3]->title()); self::assertSame('Místo narození', $columns[4]->title()); self::assertSame('Domovské právo', $columns[5]->title()); self::assertSame('', $columns[6]->title()); self::assertSame('Rodinný stav', $columns[7]->title()); self::assertSame('Jazyk v obcování', $columns[8]->title()); self::assertSame('', $columns[9]->title()); self::assertSame('Postavení v zaměstnání', $columns[10]->title()); self::assertSame('Znalost čtení a psaní', $columns[11]->title()); self::assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); } }