xref: /webtrees/tests/app/Census/CensusOfDeutschlandTest.php (revision e7f56f2af615447ab1a7646851f88b465ace9e04)
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 */
16*e7f56f2aSGreg Roachdeclare(strict_types=1);
17*e7f56f2aSGreg Roach
18ce92b752Smpwtnamespace Fisharebest\Webtrees\Census;
19ce92b752Smpwt
20ce92b752Smpwt/**
21ce92b752Smpwt * Test harness for the class CensusOfDeutschland
22ce92b752Smpwt */
2384e2cf4eSGreg Roachclass CensusOfDeutschlandTest extends \Fisharebest\Webtrees\TestCase
24c1010edaSGreg Roach{
25ce92b752Smpwt    /**
26ce92b752Smpwt     * Test the census place
27ce92b752Smpwt     *
2815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
2952348eb8SGreg Roach     *
3052348eb8SGreg Roach     * @return void
31ce92b752Smpwt     */
32c1010edaSGreg Roach    public function testPlace()
33c1010edaSGreg Roach    {
34ce92b752Smpwt        $census = new CensusOfDeutschland;
35ce92b752Smpwt
36ce92b752Smpwt        $this->assertSame('Deutschland', $census->censusPlace());
37ce92b752Smpwt    }
38ce92b752Smpwt
39ce92b752Smpwt    /**
40ce92b752Smpwt     * Test the census dates
41ce92b752Smpwt     *
4215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
4352348eb8SGreg Roach     *
4452348eb8SGreg Roach     * @return void
45ce92b752Smpwt     */
46c1010edaSGreg Roach    public function testAllDates()
47c1010edaSGreg Roach    {
48ce92b752Smpwt        $census = new CensusOfDeutschland;
49ce92b752Smpwt
50ce92b752Smpwt        $census_dates = $census->allCensusDates();
51ce92b752Smpwt
52ce92b752Smpwt        $this->assertCount(5, $census_dates);
53ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1819', $census_dates[0]);
54ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1867', $census_dates[1]);
55ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867', $census_dates[2]);
56ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1900', $census_dates[3]);
57ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1919', $census_dates[4]);
58ce92b752Smpwt    }
59ce92b752Smpwt}
60