xref: /webtrees/tests/app/Census/CensusOfDeutschlandTest.php (revision 52348eb8c11b06a8488e13475e6561273832716a)
1ce92b752Smpwt<?php
2ce92b752Smpwt/**
3ce92b752Smpwt * webtrees: online genealogy
41062a142SGreg Roach * Copyright (C) 2018 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 */
16ce92b752Smpwtnamespace Fisharebest\Webtrees\Census;
17ce92b752Smpwt
18ce92b752Smpwt/**
19ce92b752Smpwt * Test harness for the class CensusOfDeutschland
20ce92b752Smpwt */
2184e2cf4eSGreg Roachclass CensusOfDeutschlandTest extends \Fisharebest\Webtrees\TestCase
22c1010edaSGreg Roach{
23ce92b752Smpwt    /**
24ce92b752Smpwt     * Test the census place
25ce92b752Smpwt     *
2615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
27*52348eb8SGreg Roach     *
28*52348eb8SGreg Roach     * @return void
29ce92b752Smpwt     */
30c1010edaSGreg Roach    public function testPlace()
31c1010edaSGreg Roach    {
32ce92b752Smpwt        $census = new CensusOfDeutschland;
33ce92b752Smpwt
34ce92b752Smpwt        $this->assertSame('Deutschland', $census->censusPlace());
35ce92b752Smpwt    }
36ce92b752Smpwt
37ce92b752Smpwt    /**
38ce92b752Smpwt     * Test the census dates
39ce92b752Smpwt     *
4015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
41*52348eb8SGreg Roach     *
42*52348eb8SGreg Roach     * @return void
43ce92b752Smpwt     */
44c1010edaSGreg Roach    public function testAllDates()
45c1010edaSGreg Roach    {
46ce92b752Smpwt        $census = new CensusOfDeutschland;
47ce92b752Smpwt
48ce92b752Smpwt        $census_dates = $census->allCensusDates();
49ce92b752Smpwt
50ce92b752Smpwt        $this->assertCount(5, $census_dates);
51ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1819', $census_dates[0]);
52ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1867', $census_dates[1]);
53ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867', $census_dates[2]);
54ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1900', $census_dates[3]);
55ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1919', $census_dates[4]);
56ce92b752Smpwt    }
57ce92b752Smpwt}
58