1c2a8c8bfSGreg Roach<?php 23976b470SGreg Roach 3c2a8c8bfSGreg Roach/** 4c2a8c8bfSGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 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 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16c2a8c8bfSGreg Roach */ 17fcfa147eSGreg Roach 18e7f56f2aSGreg Roachdeclare(strict_types=1); 19e7f56f2aSGreg Roach 20c2a8c8bfSGreg Roachnamespace Fisharebest\Webtrees\Census; 21c2a8c8bfSGreg Roach 223cfcc809SGreg Roachuse Fisharebest\Webtrees\TestCase; 23*202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 243cfcc809SGreg Roach 25*202c018bSGreg Roach#[CoversClass(CensusOfCzechRepublic::class)] 263cfcc809SGreg Roachclass CensusOfCzechRepublicTest extends TestCase 27c1010edaSGreg Roach{ 28c2a8c8bfSGreg Roach /** 29c2a8c8bfSGreg Roach * Test the census place 30c2a8c8bfSGreg Roach */ 319b802b22SGreg Roach public function testPlace(): void 32c1010edaSGreg Roach { 3374d6dc0eSGreg Roach $census = new CensusOfCzechRepublic(); 34c2a8c8bfSGreg Roach 355e933c21SGreg Roach self::assertSame('Česko', $census->censusPlace()); 36c2a8c8bfSGreg Roach } 37c2a8c8bfSGreg Roach 38c2a8c8bfSGreg Roach /** 39d5b0584dSGreg Roach * Test the census language 40d5b0584dSGreg Roach */ 41d5b0584dSGreg Roach public function testLanguage(): void 42d5b0584dSGreg Roach { 43d5b0584dSGreg Roach $census = new CensusOfCzechRepublic(); 44d5b0584dSGreg Roach 455e933c21SGreg Roach self::assertSame('cs', $census->censusLanguage()); 46d5b0584dSGreg Roach } 47d5b0584dSGreg Roach 48d5b0584dSGreg Roach /** 49c2a8c8bfSGreg Roach * Test the census dates 50c2a8c8bfSGreg Roach */ 519b802b22SGreg Roach public function testAllDates(): void 52c1010edaSGreg Roach { 5374d6dc0eSGreg Roach $census = new CensusOfCzechRepublic(); 54c2a8c8bfSGreg Roach 55c2a8c8bfSGreg Roach $census_dates = $census->allCensusDates(); 56c2a8c8bfSGreg Roach 575e933c21SGreg Roach self::assertCount(5, $census_dates); 585e933c21SGreg Roach self::assertInstanceOf(CensusOfCzechRepublic1880::class, $census_dates[0]); 595e933c21SGreg Roach self::assertInstanceOf(CensusOfCzechRepublic1890::class, $census_dates[1]); 605e933c21SGreg Roach self::assertInstanceOf(CensusOfCzechRepublic1900::class, $census_dates[2]); 615e933c21SGreg Roach self::assertInstanceOf(CensusOfCzechRepublic1910::class, $census_dates[3]); 625e933c21SGreg Roach self::assertInstanceOf(CensusOfCzechRepublic1921::class, $census_dates[4]); 63c2a8c8bfSGreg Roach } 64c2a8c8bfSGreg Roach} 65