1c2a8c8bfSGreg Roach<?php 23976b470SGreg Roach 3c2a8c8bfSGreg Roach/** 4c2a8c8bfSGreg Roach * webtrees: online genealogy 58fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team 6c2a8c8bfSGreg Roach * This program is free software: you can redistribute it and/or modify 7c2a8c8bfSGreg Roach * it under the terms of the GNU General Public License as published by 8c2a8c8bfSGreg Roach * the Free Software Foundation, either version 3 of the License, or 9c2a8c8bfSGreg Roach * (at your option) any later version. 10c2a8c8bfSGreg Roach * This program is distributed in the hope that it will be useful, 11c2a8c8bfSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12c2a8c8bfSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13c2a8c8bfSGreg Roach * GNU General Public License for more details. 14c2a8c8bfSGreg Roach * You should have received a copy of the GNU General Public License 15c2a8c8bfSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 16c2a8c8bfSGreg Roach */ 17*fcfa147eSGreg Roach 18e7f56f2aSGreg Roachdeclare(strict_types=1); 19e7f56f2aSGreg Roach 20c2a8c8bfSGreg Roachnamespace Fisharebest\Webtrees\Census; 21c2a8c8bfSGreg Roach 223cfcc809SGreg Roachuse Fisharebest\Webtrees\TestCase; 233cfcc809SGreg Roach 24c2a8c8bfSGreg Roach/** 25c2a8c8bfSGreg Roach * Test harness for the class CensusOfCzechRepublic 26c2a8c8bfSGreg Roach */ 273cfcc809SGreg Roachclass CensusOfCzechRepublicTest extends TestCase 28c1010edaSGreg Roach{ 29c2a8c8bfSGreg Roach /** 30c2a8c8bfSGreg Roach * Test the census place 31c2a8c8bfSGreg Roach * 3215d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic 3352348eb8SGreg Roach * 3452348eb8SGreg Roach * @return void 35c2a8c8bfSGreg Roach */ 369b802b22SGreg Roach public function testPlace(): void 37c1010edaSGreg Roach { 3874d6dc0eSGreg Roach $census = new CensusOfCzechRepublic(); 39c2a8c8bfSGreg Roach 40c2a8c8bfSGreg Roach $this->assertSame('Česko', $census->censusPlace()); 41c2a8c8bfSGreg Roach } 42c2a8c8bfSGreg Roach 43c2a8c8bfSGreg Roach /** 44c2a8c8bfSGreg Roach * Test the census dates 45c2a8c8bfSGreg Roach * 4615d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic 4752348eb8SGreg Roach * 4852348eb8SGreg Roach * @return void 49c2a8c8bfSGreg Roach */ 509b802b22SGreg Roach public function testAllDates(): void 51c1010edaSGreg Roach { 5274d6dc0eSGreg Roach $census = new CensusOfCzechRepublic(); 53c2a8c8bfSGreg Roach 54c2a8c8bfSGreg Roach $census_dates = $census->allCensusDates(); 55c2a8c8bfSGreg Roach 56fbf0a249SGreg Roach $this->assertCount(5, $census_dates); 5771378461SGreg Roach $this->assertInstanceOf(CensusOfCzechRepublic1880::class, $census_dates[0]); 5871378461SGreg Roach $this->assertInstanceOf(CensusOfCzechRepublic1890::class, $census_dates[1]); 5971378461SGreg Roach $this->assertInstanceOf(CensusOfCzechRepublic1900::class, $census_dates[2]); 6071378461SGreg Roach $this->assertInstanceOf(CensusOfCzechRepublic1910::class, $census_dates[3]); 6171378461SGreg Roach $this->assertInstanceOf(CensusOfCzechRepublic1921::class, $census_dates[4]); 62c2a8c8bfSGreg Roach } 63c2a8c8bfSGreg Roach} 64