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