1c2a8c8bfSGreg Roach<?php 2c2a8c8bfSGreg Roach 3c2a8c8bfSGreg Roach/** 4c2a8c8bfSGreg Roach * webtrees: online genealogy 56bdf7674SGreg Roach * Copyright (C) 2017 webtrees development team 6c2a8c8bfSGreg Roach * This program is free software: you can redistribute it and/or modify 7c2a8c8bfSGreg Roach * it under the terms of the GNU General Public License as published by 8c2a8c8bfSGreg Roach * the Free Software Foundation, either version 3 of the License, or 9c2a8c8bfSGreg Roach * (at your option) any later version. 10c2a8c8bfSGreg Roach * This program is distributed in the hope that it will be useful, 11c2a8c8bfSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12c2a8c8bfSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13c2a8c8bfSGreg Roach * GNU General Public License for more details. 14c2a8c8bfSGreg Roach * You should have received a copy of the GNU General Public License 15c2a8c8bfSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 16c2a8c8bfSGreg Roach */ 17c2a8c8bfSGreg Roachnamespace Fisharebest\Webtrees\Census; 18c2a8c8bfSGreg Roach 19c2a8c8bfSGreg Roach/** 20c2a8c8bfSGreg Roach * Test harness for the class CensusOfCzechRepublic1880 21c2a8c8bfSGreg Roach */ 22*3e983931SGreg Roachclass CensusOfCzechRepublic1880Test extends \PHPUnit\Framework\TestCase { 23c2a8c8bfSGreg Roach /** 24c2a8c8bfSGreg Roach * Test the census place and date 25c2a8c8bfSGreg Roach * 2615d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 27c2a8c8bfSGreg Roach */ 28c2a8c8bfSGreg Roach public function testPlaceAndDate() { 29c2a8c8bfSGreg Roach $census = new CensusOfCzechRepublic1880; 30c2a8c8bfSGreg Roach 31c2a8c8bfSGreg Roach $this->assertSame('Česko', $census->censusPlace()); 32c2a8c8bfSGreg Roach $this->assertSame('31 DEC 1880', $census->censusDate()); 33c2a8c8bfSGreg Roach } 34c2a8c8bfSGreg Roach 35c2a8c8bfSGreg Roach /** 36c2a8c8bfSGreg Roach * Test the census columns 37c2a8c8bfSGreg Roach * 3815d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 3915d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn 40c2a8c8bfSGreg Roach */ 41c2a8c8bfSGreg Roach public function testColumns() { 42c2a8c8bfSGreg Roach $census = new CensusOfCzechRepublic1880; 43c2a8c8bfSGreg Roach $columns = $census->columns(); 44c2a8c8bfSGreg Roach 45fbf0a249SGreg Roach $this->assertCount(13, $columns); 46c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); 47fbf0a249SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); 48fbf0a249SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); 49c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); 50c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); 51c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); 52c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); 53c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); 54c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); 55c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); 56c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); 57c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); 58c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); 59c2a8c8bfSGreg Roach 60c2a8c8bfSGreg Roach $this->assertSame('Jméno', $columns[0]->abbreviation()); 61fbf0a249SGreg Roach $this->assertSame('Vztah', $columns[1]->abbreviation()); 62fbf0a249SGreg Roach $this->assertSame('Pohlaví', $columns[2]->abbreviation()); 63c2a8c8bfSGreg Roach $this->assertSame('Narození', $columns[3]->abbreviation()); 64fbf0a249SGreg Roach $this->assertSame('Rodiště', $columns[4]->abbreviation()); 65c2a8c8bfSGreg Roach $this->assertSame('Přísluší', $columns[5]->abbreviation()); 66c2a8c8bfSGreg Roach $this->assertSame('Vyznání', $columns[6]->abbreviation()); 67c2a8c8bfSGreg Roach $this->assertSame('Stav', $columns[7]->abbreviation()); 68c2a8c8bfSGreg Roach $this->assertSame('Jazyk', $columns[8]->abbreviation()); 69c2a8c8bfSGreg Roach $this->assertSame('Povolání', $columns[9]->abbreviation()); 70c2a8c8bfSGreg Roach $this->assertSame('Postavení', $columns[10]->abbreviation()); 71fbf0a249SGreg Roach $this->assertSame('Gramotnost', $columns[11]->abbreviation()); 72fbf0a249SGreg Roach $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); 73c2a8c8bfSGreg Roach 74c2a8c8bfSGreg Roach $this->assertSame('', $columns[0]->title()); 75c2a8c8bfSGreg Roach $this->assertSame('', $columns[1]->title()); 76c2a8c8bfSGreg Roach $this->assertSame('', $columns[2]->title()); 77c2a8c8bfSGreg Roach $this->assertSame('Datum narození', $columns[3]->title()); 78c2a8c8bfSGreg Roach $this->assertSame('Místo narození', $columns[4]->title()); 79c2a8c8bfSGreg Roach $this->assertSame('Domovské právo', $columns[5]->title()); 80c2a8c8bfSGreg Roach $this->assertSame('', $columns[6]->title()); 81c2a8c8bfSGreg Roach $this->assertSame('Rodinný stav', $columns[7]->title()); 82c2a8c8bfSGreg Roach $this->assertSame('Jazyk v obcování', $columns[8]->title()); 83c2a8c8bfSGreg Roach $this->assertSame('', $columns[9]->title()); 84c2a8c8bfSGreg Roach $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); 85fbf0a249SGreg Roach $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); 86fbf0a249SGreg Roach $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); 87c2a8c8bfSGreg Roach } 88c2a8c8bfSGreg Roach} 89