1*ce92b752Smpwt<?php 2*ce92b752Smpwt 3*ce92b752Smpwt/** 4*ce92b752Smpwt * webtrees: online genealogy 5*ce92b752Smpwt * Copyright (C) 2016 webtrees development team 6*ce92b752Smpwt * This program is free software: you can redistribute it and/or modify 7*ce92b752Smpwt * it under the terms of the GNU General Public License as published by 8*ce92b752Smpwt * the Free Software Foundation, either version 3 of the License, or 9*ce92b752Smpwt * (at your option) any later version. 10*ce92b752Smpwt * This program is distributed in the hope that it will be useful, 11*ce92b752Smpwt * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*ce92b752Smpwt * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*ce92b752Smpwt * GNU General Public License for more details. 14*ce92b752Smpwt * You should have received a copy of the GNU General Public License 15*ce92b752Smpwt * along with this program. If not, see <http://www.gnu.org/licenses/>. 16*ce92b752Smpwt */ 17*ce92b752Smpwtnamespace Fisharebest\Webtrees\Census; 18*ce92b752Smpwt 19*ce92b752Smpwt/** 20*ce92b752Smpwt * Test harness for the class CensusOfDeutschland1867 21*ce92b752Smpwt */ 22*ce92b752Smpwtclass CensusOfDeutschland1867Test extends \PHPUnit_Framework_TestCase { 23*ce92b752Smpwt /** 24*ce92b752Smpwt * Test the census place and date 25*ce92b752Smpwt * 26*ce92b752Smpwt * @covers Fisharebest\Webtrees\Census\CensusOfDeutschland1867 27*ce92b752Smpwt */ 28*ce92b752Smpwt public function testPlaceAndDate() { 29*ce92b752Smpwt $census = new CensusOfDeutschland1867; 30*ce92b752Smpwt 31*ce92b752Smpwt $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); 32*ce92b752Smpwt $this->assertSame('03 DEC 1867', $census->censusDate()); 33*ce92b752Smpwt } 34*ce92b752Smpwt 35*ce92b752Smpwt /** 36*ce92b752Smpwt * Test the census columns 37*ce92b752Smpwt * 38*ce92b752Smpwt * @covers Fisharebest\Webtrees\Census\CensusOfDeutschland1867 39*ce92b752Smpwt * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn 40*ce92b752Smpwt */ 41*ce92b752Smpwt public function testColumns() { 42*ce92b752Smpwt $census = new CensusOfDeutschland1867; 43*ce92b752Smpwt $columns = $census->columns(); 44*ce92b752Smpwt 45*ce92b752Smpwt $this->assertCount(23, $columns); 46*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); 47*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); 48*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); 49*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); 50*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); 51*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); 52*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); 53*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); 54*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); 55*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); 56*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); 57*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[11]); 58*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[12]); 59*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); 60*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); 61*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); 62*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); 63*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); 64*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); 65*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); 66*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); 67*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); 68*ce92b752Smpwt $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); 69*ce92b752Smpwt 70*ce92b752Smpwt $this->assertSame('1.Nr.', $columns[0]->abbreviation()); 71*ce92b752Smpwt $this->assertSame('2.Vorname', $columns[1]->abbreviation()); 72*ce92b752Smpwt $this->assertSame('3.Familienname', $columns[2]->abbreviation()); 73*ce92b752Smpwt $this->assertSame('4.männlich', $columns[3]->abbreviation()); 74*ce92b752Smpwt $this->assertSame('5.weiblich', $columns[4]->abbreviation()); 75*ce92b752Smpwt $this->assertSame('6.Geburtsjahr', $columns[5]->abbreviation()); 76*ce92b752Smpwt $this->assertSame('7.Religion', $columns[6]->abbreviation()); 77*ce92b752Smpwt $this->assertSame('8.ledig', $columns[7]->abbreviation()); 78*ce92b752Smpwt $this->assertSame('9.verehelicht', $columns[8]->abbreviation()); 79*ce92b752Smpwt $this->assertSame('10.verwittwet', $columns[9]->abbreviation()); 80*ce92b752Smpwt $this->assertSame('11.geschieden', $columns[10]->abbreviation()); 81*ce92b752Smpwt $this->assertSame('12.Stellung', $columns[11]->abbreviation()); 82*ce92b752Smpwt $this->assertSame('13.Stand/Beruf', $columns[12]->abbreviation()); 83*ce92b752Smpwt $this->assertSame('14.StA_M-S', $columns[13]->abbreviation()); 84*ce92b752Smpwt $this->assertSame('15.StA', $columns[14]->abbreviation()); 85*ce92b752Smpwt $this->assertSame('16.', $columns[15]->abbreviation()); 86*ce92b752Smpwt $this->assertSame('17.', $columns[16]->abbreviation()); 87*ce92b752Smpwt $this->assertSame('18.', $columns[17]->abbreviation()); 88*ce92b752Smpwt $this->assertSame('19.', $columns[18]->abbreviation()); 89*ce92b752Smpwt $this->assertSame('20.blind', $columns[19]->abbreviation()); 90*ce92b752Smpwt $this->assertSame('21.taubstumm', $columns[20]->abbreviation()); 91*ce92b752Smpwt $this->assertSame('22.blödsinnig', $columns[21]->abbreviation()); 92*ce92b752Smpwt $this->assertSame('23.irrsinnig', $columns[22]->abbreviation()); 93*ce92b752Smpwt 94*ce92b752Smpwt $this->assertSame('Ordnungs-Nummer (1-15).', $columns[0]->title()); 95*ce92b752Smpwt $this->assertSame('I. Vor- und Familien-Name jeder Person. Vorname', $columns[1]->title()); 96*ce92b752Smpwt $this->assertSame('I. Vor- und Familien-Name jeder Person. Familienname.', $columns[2]->title()); 97*ce92b752Smpwt $this->assertSame('II. Geschlecht männlich.', $columns[3]->title()); 98*ce92b752Smpwt $this->assertSame('II. Geschlecht weiblich.', $columns[4]->title()); 99*ce92b752Smpwt $this->assertSame('III. Alter.', $columns[5]->title()); 100*ce92b752Smpwt $this->assertSame('IV. Religionsbekenntnis.', $columns[6]->title()); 101*ce92b752Smpwt $this->assertSame('V. Familienstand. ledig.', $columns[7]->title()); 102*ce92b752Smpwt $this->assertSame('V. Familienstand. verehelicht.', $columns[8]->title()); 103*ce92b752Smpwt $this->assertSame('V. Familienstand. verwittwet.', $columns[9]->title()); 104*ce92b752Smpwt $this->assertSame('V. Familienstand. geschieden.', $columns[10]->title()); 105*ce92b752Smpwt $this->assertSame('V. Familienstand. Verhältnis der Familienglieder zum Haushaltungsvorstand.', $columns[11]->title()); 106*ce92b752Smpwt $this->assertSame('VI. Stand, Beruf oder Vorbereitung zum Beruf, Arbeits- und Dienstverhältnis.', $columns[12]->title()); 107*ce92b752Smpwt $this->assertSame('VII. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.', $columns[13]->title()); 108*ce92b752Smpwt $this->assertSame('VII. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?', $columns[14]->title()); 109*ce92b752Smpwt $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Norddeutscher und Zollvereins- See- und Flußschiffer.', $columns[15]->title()); 110*ce92b752Smpwt $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Reisender im Gasthof.', $columns[16]->title()); 111*ce92b752Smpwt $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Gast der Familie (zum Besuch aus).', $columns[17]->title()); 112*ce92b752Smpwt $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Alle übrigen Anwesenden.', $columns[18]->title()); 113*ce92b752Smpwt $this->assertSame('IX. Besondere Mängel einzelner Individuen. blind auf beiden Augen.', $columns[19]->title()); 114*ce92b752Smpwt $this->assertSame('IX. Besondere Mängel einzelner Individuen. taubstumm.', $columns[20]->title()); 115*ce92b752Smpwt $this->assertSame('IX. Besondere Mängel einzelner Individuen. blödsinnig.', $columns[21]->title()); 116*ce92b752Smpwt $this->assertSame('IX. Besondere Mängel einzelner Individuen. irrsinnig.', $columns[22]->title()); 117*ce92b752Smpwt } 118*ce92b752Smpwt}