xref: /webtrees/tests/app/Census/CensusOfDeutschlandTest.php (revision 84e2cf4e2b1803b300330f631d304db1a3c443dd)
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 */
21*84e2cf4eSGreg Roachclass CensusOfDeutschlandTest extends \Fisharebest\Webtrees\TestCase
22c1010edaSGreg Roach{
23ce92b752Smpwt    /**
24ce92b752Smpwt     * Test the census place
25ce92b752Smpwt     *
2615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
27ce92b752Smpwt     */
28c1010edaSGreg Roach    public function testPlace()
29c1010edaSGreg Roach    {
30ce92b752Smpwt        $census = new CensusOfDeutschland;
31ce92b752Smpwt
32ce92b752Smpwt        $this->assertSame('Deutschland', $census->censusPlace());
33ce92b752Smpwt    }
34ce92b752Smpwt
35ce92b752Smpwt    /**
36ce92b752Smpwt     * Test the census dates
37ce92b752Smpwt     *
3815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland
39ce92b752Smpwt     */
40c1010edaSGreg Roach    public function testAllDates()
41c1010edaSGreg Roach    {
42ce92b752Smpwt        $census = new CensusOfDeutschland;
43ce92b752Smpwt
44ce92b752Smpwt        $census_dates = $census->allCensusDates();
45ce92b752Smpwt
46ce92b752Smpwt        $this->assertCount(5, $census_dates);
47ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1819', $census_dates[0]);
48ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1867', $census_dates[1]);
49ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867', $census_dates[2]);
50ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1900', $census_dates[3]);
51ce92b752Smpwt        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1919', $census_dates[4]);
52ce92b752Smpwt    }
53ce92b752Smpwt}
54