xref: /webtrees/tests/app/Census/CensusOfCzechRepublicTest.php (revision 8fcd0d32e56ee262912bbdb593202cfd1cbc1615)
1c2a8c8bfSGreg Roach<?php
2c2a8c8bfSGreg Roach/**
3c2a8c8bfSGreg Roach * webtrees: online genealogy
4*8fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team
5c2a8c8bfSGreg Roach * This program is free software: you can redistribute it and/or modify
6c2a8c8bfSGreg Roach * it under the terms of the GNU General Public License as published by
7c2a8c8bfSGreg Roach * the Free Software Foundation, either version 3 of the License, or
8c2a8c8bfSGreg Roach * (at your option) any later version.
9c2a8c8bfSGreg Roach * This program is distributed in the hope that it will be useful,
10c2a8c8bfSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11c2a8c8bfSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12c2a8c8bfSGreg Roach * GNU General Public License for more details.
13c2a8c8bfSGreg Roach * You should have received a copy of the GNU General Public License
14c2a8c8bfSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15c2a8c8bfSGreg Roach */
16e7f56f2aSGreg Roachdeclare(strict_types=1);
17e7f56f2aSGreg Roach
18c2a8c8bfSGreg Roachnamespace Fisharebest\Webtrees\Census;
19c2a8c8bfSGreg Roach
20c2a8c8bfSGreg Roach/**
21c2a8c8bfSGreg Roach * Test harness for the class CensusOfCzechRepublic
22c2a8c8bfSGreg Roach */
2384e2cf4eSGreg Roachclass CensusOfCzechRepublicTest extends \Fisharebest\Webtrees\TestCase
24c1010edaSGreg Roach{
25c2a8c8bfSGreg Roach    /**
26c2a8c8bfSGreg Roach     * Test the census place
27c2a8c8bfSGreg Roach     *
2815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic
2952348eb8SGreg Roach     *
3052348eb8SGreg Roach     * @return void
31c2a8c8bfSGreg Roach     */
32c1010edaSGreg Roach    public function testPlace()
33c1010edaSGreg Roach    {
34c2a8c8bfSGreg Roach        $census = new CensusOfCzechRepublic;
35c2a8c8bfSGreg Roach
36c2a8c8bfSGreg Roach        $this->assertSame('Česko', $census->censusPlace());
37c2a8c8bfSGreg Roach    }
38c2a8c8bfSGreg Roach
39c2a8c8bfSGreg Roach    /**
40c2a8c8bfSGreg Roach     * Test the census dates
41c2a8c8bfSGreg Roach     *
4215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic
4352348eb8SGreg Roach     *
4452348eb8SGreg Roach     * @return void
45c2a8c8bfSGreg Roach     */
46c1010edaSGreg Roach    public function testAllDates()
47c1010edaSGreg Roach    {
48c2a8c8bfSGreg Roach        $census = new CensusOfCzechRepublic;
49c2a8c8bfSGreg Roach
50c2a8c8bfSGreg Roach        $census_dates = $census->allCensusDates();
51c2a8c8bfSGreg Roach
52fbf0a249SGreg Roach        $this->assertCount(5, $census_dates);
53c2a8c8bfSGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880', $census_dates[0]);
54fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890', $census_dates[1]);
55fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900', $census_dates[2]);
56fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910', $census_dates[3]);
57fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921', $census_dates[4]);
58c2a8c8bfSGreg Roach    }
59c2a8c8bfSGreg Roach}
60