xref: /webtrees/tests/app/Census/CensusOfDeutschland1900Test.php (revision 3e983931fdde6db78f1490364106d7d46e77dea7)
1ce92b752Smpwt<?php
2ce92b752Smpwt
3ce92b752Smpwt/**
4ce92b752Smpwt * webtrees: online genealogy
56bdf7674SGreg Roach * Copyright (C) 2017 webtrees development team
6ce92b752Smpwt * This program is free software: you can redistribute it and/or modify
7ce92b752Smpwt * it under the terms of the GNU General Public License as published by
8ce92b752Smpwt * the Free Software Foundation, either version 3 of the License, or
9ce92b752Smpwt * (at your option) any later version.
10ce92b752Smpwt * This program is distributed in the hope that it will be useful,
11ce92b752Smpwt * but WITHOUT ANY WARRANTY; without even the implied warranty of
12ce92b752Smpwt * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13ce92b752Smpwt * GNU General Public License for more details.
14ce92b752Smpwt * You should have received a copy of the GNU General Public License
15ce92b752Smpwt * along with this program. If not, see <http://www.gnu.org/licenses/>.
16ce92b752Smpwt */
17ce92b752Smpwtnamespace Fisharebest\Webtrees\Census;
18ce92b752Smpwt
19ce92b752Smpwt/**
20ce92b752Smpwt * Test harness for the class CensusOfDeutschland1900
21ce92b752Smpwt */
22*3e983931SGreg Roachclass CensusOfDeutschland1900Test extends \PHPUnit\Framework\TestCase {
23ce92b752Smpwt	/**
24ce92b752Smpwt	 * Test the census place and date
25ce92b752Smpwt	 *
2615d603e7SGreg Roach	 * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900
27ce92b752Smpwt	 */
28ce92b752Smpwt	public function testPlaceAndDate() {
29ce92b752Smpwt		$census = new CensusOfDeutschland1900;
30ce92b752Smpwt
31ce92b752Smpwt		$this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace());
32ce92b752Smpwt		$this->assertSame('01 DEC 1900', $census->censusDate());
33ce92b752Smpwt	}
34ce92b752Smpwt
35ce92b752Smpwt	/**
36ce92b752Smpwt	 * Test the census columns
37ce92b752Smpwt	 *
3815d603e7SGreg Roach	 * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900
3915d603e7SGreg Roach	 * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn
40ce92b752Smpwt	 */
41ce92b752Smpwt	public function testColumns() {
42ce92b752Smpwt		$census  = new CensusOfDeutschland1900;
43ce92b752Smpwt		$columns = $census->columns();
44ce92b752Smpwt
45ce92b752Smpwt		$this->assertCount(27, $columns);
46ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]);
47ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]);
48ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]);
49ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[3]);
50ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]);
51ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]);
52ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]);
53ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]);
54ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]);
55ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]);
56ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[10]);
57ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]);
58ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]);
59ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYear', $columns[13]);
60ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[14]);
61ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]);
62ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[16]);
63ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]);
64ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]);
65ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]);
66ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]);
67ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[21]);
68ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]);
69ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]);
70ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]);
71ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]);
72ce92b752Smpwt		$this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]);
73ce92b752Smpwt
74ce92b752Smpwt		$this->assertSame('Lfd.Nr.', $columns[0]->abbreviation());
75ce92b752Smpwt		$this->assertSame('Vorname', $columns[1]->abbreviation());
76ce92b752Smpwt		$this->assertSame('Familienname', $columns[2]->abbreviation());
77ce92b752Smpwt		$this->assertSame('Stellung', $columns[3]->abbreviation());
78ce92b752Smpwt		$this->assertSame('männlich', $columns[4]->abbreviation());
79ce92b752Smpwt		$this->assertSame('weiblich', $columns[5]->abbreviation());
80ce92b752Smpwt		$this->assertSame('Blind', $columns[6]->abbreviation());
81ce92b752Smpwt		$this->assertSame('Taubstumm', $columns[7]->abbreviation());
82ce92b752Smpwt		$this->assertSame('Bemerkungen', $columns[8]->abbreviation());
83ce92b752Smpwt		$this->assertSame('', $columns[9]->abbreviation());
84ce92b752Smpwt		$this->assertSame('ZK 1.Name', $columns[10]->abbreviation());
85ce92b752Smpwt		$this->assertSame('ZK 2.Geschlecht', $columns[11]->abbreviation());
86ce92b752Smpwt		$this->assertSame('ZK 3.Familienstand', $columns[12]->abbreviation());
87ce92b752Smpwt		$this->assertSame('ZK 4.Alter', $columns[13]->abbreviation());
88ce92b752Smpwt		$this->assertSame('ZK 5.Geburtsort', $columns[14]->abbreviation());
89ce92b752Smpwt		$this->assertSame('ZK 5.Land/Provinz', $columns[15]->abbreviation());
90ce92b752Smpwt		$this->assertSame('ZK 6.Beruf/Stand', $columns[16]->abbreviation());
91ce92b752Smpwt		$this->assertSame('ZK 7a.Gemeinde Wohnort', $columns[17]->abbreviation());
92ce92b752Smpwt		$this->assertSame('ZK 7a.Land/Provinz', $columns[18]->abbreviation());
93ce92b752Smpwt		$this->assertSame('ZK 7b.Gemeinde Erwerbsort', $columns[19]->abbreviation());
94ce92b752Smpwt		$this->assertSame('ZK 7b.Land/Provinz', $columns[20]->abbreviation());
95ce92b752Smpwt		$this->assertSame('ZK 8.Religion', $columns[21]->abbreviation());
96ce92b752Smpwt		$this->assertSame('ZK 9.Muttersprache', $columns[22]->abbreviation());
97ce92b752Smpwt		$this->assertSame('ZK 10.StA', $columns[23]->abbreviation());
98ce92b752Smpwt		$this->assertSame('ZK 11.Dienstgrad', $columns[24]->abbreviation());
99ce92b752Smpwt		$this->assertSame('ZK 11.Einheit', $columns[25]->abbreviation());
100ce92b752Smpwt		$this->assertSame('ZK 12.Gebrechen', $columns[26]->abbreviation());
101ce92b752Smpwt
102ce92b752Smpwt		$this->assertSame('Laufende Nummer', $columns[0]->title());
103ce92b752Smpwt		$this->assertSame('Vorname', $columns[1]->title());
104ce92b752Smpwt		$this->assertSame('Familienname', $columns[2]->title());
105ce92b752Smpwt		$this->assertSame('Verwandtschaft oder sonstige Stellung zum Haushaltungsvorstand', $columns[3]->title());
106ce92b752Smpwt		$this->assertSame('Geschlecht männlich', $columns[4]->title());
107ce92b752Smpwt		$this->assertSame('Geschlecht weiblich', $columns[5]->title());
108ce92b752Smpwt		$this->assertSame('Blind auf beiden Augen', $columns[6]->title());
109ce92b752Smpwt		$this->assertSame('Taubstumm', $columns[7]->title());
110ce92b752Smpwt		$this->assertSame('Bemerkungen', $columns[8]->title());
111ce92b752Smpwt		$this->assertSame('Nachfolgend die detaillierten Zählkartenangaben', $columns[9]->title());
112ce92b752Smpwt		$this->assertSame('1. Vor- und Familienname:', $columns[10]->title());
113ce92b752Smpwt		$this->assertSame('2. Geschlecht:', $columns[11]->title());
114ce92b752Smpwt		$this->assertSame('3. Familienstand:', $columns[12]->title());
115ce92b752Smpwt		$this->assertSame('4. Alter: geboren den ... im Jahre ...', $columns[13]->title());
116ce92b752Smpwt		$this->assertSame('5. Geburtsort: ... im Bezirk (Amt) ...', $columns[14]->title());
117ce92b752Smpwt		$this->assertSame('für außerhalb des Großherzogthums Geborene auch Geburtsland, für in Preußen Geborene auch Provinz: ...', $columns[15]->title());
118ce92b752Smpwt		$this->assertSame('6. Beruf, Stand, Erwerb, Gewerbe, Geschäft oder Nahrungszweig:', $columns[16]->title());
119ce92b752Smpwt		$this->assertSame('7.a. Gemeinde (Ortschaft), in welcher der Wohnort (Wohnung), bei verheiratheten Personen der Familienwohnsitz liegt:', $columns[17]->title());
120ce92b752Smpwt		$this->assertSame('für außerhalb des Großherzogthums Wohnende auch Staat und für in Preußen Wohnende auch Provinz: ...', $columns[18]->title());
121ce92b752Smpwt		$this->assertSame('7.b. Gemeinde (Ortschaft), in welcher der Beruf (die Erwerbsthätigkeit) zur Zeit ausgeübt wird oder zuletzt ausgeübt wurde:', $columns[19]->title());
122ce92b752Smpwt		$this->assertSame('für außerhalb des Großherzogthums Arbeitende auch Staat und für in Preußen Arbeitende auch Provinz: ...', $columns[20]->title());
123ce92b752Smpwt		$this->assertSame('8. Religionsbekenntnis:', $columns[21]->title());
124ce92b752Smpwt		$this->assertSame('9. Muttersprache (ob deutsch oder welche andere Sprache?):', $columns[22]->title());
125ce92b752Smpwt		$this->assertSame('10. Staatsangehörigkeit:', $columns[23]->title());
126ce92b752Smpwt		$this->assertSame('11. Für Militärpersonen im aktiven Dienste: Dienstgrad:', $columns[24]->title());
127ce92b752Smpwt		$this->assertSame('Truppentheil, Kommando- oder Verwaltungsbehörde:', $columns[25]->title());
128ce92b752Smpwt		$this->assertSame('12. Etwaige körperliche Mängel und Gebrechen:', $columns[26]->title());
129ce92b752Smpwt	}
130ce92b752Smpwt}
131