xref: /webtrees/tests/app/Census/CensusOfCzechRepublicTest.php (revision 84e2cf4e2b1803b300330f631d304db1a3c443dd)
1c2a8c8bfSGreg Roach<?php
2c2a8c8bfSGreg Roach/**
3c2a8c8bfSGreg Roach * webtrees: online genealogy
41062a142SGreg Roach * Copyright (C) 2018 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 */
16c2a8c8bfSGreg Roachnamespace Fisharebest\Webtrees\Census;
17c2a8c8bfSGreg Roach
18c2a8c8bfSGreg Roach/**
19c2a8c8bfSGreg Roach * Test harness for the class CensusOfCzechRepublic
20c2a8c8bfSGreg Roach */
21*84e2cf4eSGreg Roachclass CensusOfCzechRepublicTest extends \Fisharebest\Webtrees\TestCase
22c1010edaSGreg Roach{
23c2a8c8bfSGreg Roach    /**
24c2a8c8bfSGreg Roach     * Test the census place
25c2a8c8bfSGreg Roach     *
2615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic
27c2a8c8bfSGreg Roach     */
28c1010edaSGreg Roach    public function testPlace()
29c1010edaSGreg Roach    {
30c2a8c8bfSGreg Roach        $census = new CensusOfCzechRepublic;
31c2a8c8bfSGreg Roach
32c2a8c8bfSGreg Roach        $this->assertSame('Česko', $census->censusPlace());
33c2a8c8bfSGreg Roach    }
34c2a8c8bfSGreg Roach
35c2a8c8bfSGreg Roach    /**
36c2a8c8bfSGreg Roach     * Test the census dates
37c2a8c8bfSGreg Roach     *
3815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic
39c2a8c8bfSGreg Roach     */
40c1010edaSGreg Roach    public function testAllDates()
41c1010edaSGreg Roach    {
42c2a8c8bfSGreg Roach        $census = new CensusOfCzechRepublic;
43c2a8c8bfSGreg Roach
44c2a8c8bfSGreg Roach        $census_dates = $census->allCensusDates();
45c2a8c8bfSGreg Roach
46fbf0a249SGreg Roach        $this->assertCount(5, $census_dates);
47c2a8c8bfSGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880', $census_dates[0]);
48fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890', $census_dates[1]);
49fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900', $census_dates[2]);
50fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910', $census_dates[3]);
51fbf0a249SGreg Roach        $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921', $census_dates[4]);
52c2a8c8bfSGreg Roach    }
53c2a8c8bfSGreg Roach}
54