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 */ 22c2a8c8bfSGreg Roachclass CensusOfCzechRepublic1880Test extends \PHPUnit_Framework_TestCase { 23c2a8c8bfSGreg Roach /** 24c2a8c8bfSGreg Roach * Test the census place and date 25c2a8c8bfSGreg Roach * 26*15d603e7SGreg 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 * 38*15d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 39*15d603e7SGreg 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 45c2a8c8bfSGreg Roach $this->assertCount(14, $columns); 46c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); 47c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[1]); 48c2a8c8bfSGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $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 $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); 60c2a8c8bfSGreg Roach 61c2a8c8bfSGreg Roach $this->assertSame('Jméno', $columns[0]->abbreviation()); 62c2a8c8bfSGreg Roach $this->assertSame('Pohlaví', $columns[1]->abbreviation()); 63c2a8c8bfSGreg Roach $this->assertSame('Vztah', $columns[2]->abbreviation()); 64c2a8c8bfSGreg Roach $this->assertSame('Narození', $columns[3]->abbreviation()); 65c2a8c8bfSGreg Roach $this->assertSame('Místo', $columns[4]->abbreviation()); 66c2a8c8bfSGreg Roach $this->assertSame('Přísluší', $columns[5]->abbreviation()); 67c2a8c8bfSGreg Roach $this->assertSame('Vyznání', $columns[6]->abbreviation()); 68c2a8c8bfSGreg Roach $this->assertSame('Stav', $columns[7]->abbreviation()); 69c2a8c8bfSGreg Roach $this->assertSame('Jazyk', $columns[8]->abbreviation()); 70c2a8c8bfSGreg Roach $this->assertSame('Povolání', $columns[9]->abbreviation()); 71c2a8c8bfSGreg Roach $this->assertSame('Postavení', $columns[10]->abbreviation()); 72c2a8c8bfSGreg Roach $this->assertSame('', $columns[11]->abbreviation()); 73c2a8c8bfSGreg Roach $this->assertSame('', $columns[12]->abbreviation()); 74c2a8c8bfSGreg Roach $this->assertSame('', $columns[13]->abbreviation()); 75c2a8c8bfSGreg Roach 76c2a8c8bfSGreg Roach $this->assertSame('', $columns[0]->title()); 77c2a8c8bfSGreg Roach $this->assertSame('', $columns[1]->title()); 78c2a8c8bfSGreg Roach $this->assertSame('', $columns[2]->title()); 79c2a8c8bfSGreg Roach $this->assertSame('Datum narození', $columns[3]->title()); 80c2a8c8bfSGreg Roach $this->assertSame('Místo narození', $columns[4]->title()); 81c2a8c8bfSGreg Roach $this->assertSame('Domovské právo', $columns[5]->title()); 82c2a8c8bfSGreg Roach $this->assertSame('', $columns[6]->title()); 83c2a8c8bfSGreg Roach $this->assertSame('Rodinný stav', $columns[7]->title()); 84c2a8c8bfSGreg Roach $this->assertSame('Jazyk v obcování', $columns[8]->title()); 85c2a8c8bfSGreg Roach $this->assertSame('', $columns[9]->title()); 86c2a8c8bfSGreg Roach $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); 87c2a8c8bfSGreg Roach $this->assertSame('', $columns[11]->title()); 88c2a8c8bfSGreg Roach $this->assertSame('', $columns[12]->title()); 89c2a8c8bfSGreg Roach $this->assertSame('', $columns[13]->title()); 90c2a8c8bfSGreg Roach } 91c2a8c8bfSGreg Roach} 92