1a8139624SGreg Roach<?php 2a8139624SGreg Roach 3a8139624SGreg Roach/** 4a8139624SGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 6a8139624SGreg Roach * This program is free software: you can redistribute it and/or modify 7a8139624SGreg Roach * it under the terms of the GNU General Public License as published by 8a8139624SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9a8139624SGreg Roach * (at your option) any later version. 10a8139624SGreg Roach * This program is distributed in the hope that it will be useful, 11a8139624SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12a8139624SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13a8139624SGreg Roach * GNU General Public License for more details. 14a8139624SGreg Roach * You should have received a copy of the GNU General Public License 15a8139624SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16a8139624SGreg Roach */ 17a8139624SGreg Roach 18a8139624SGreg Roachdeclare(strict_types=1); 19a8139624SGreg Roach 20a8139624SGreg Roachnamespace Fisharebest\Webtrees\Module; 21a8139624SGreg Roach 22*3ee4c7efSGreg Roachuse Fisharebest\Webtrees\Fact; 23*3ee4c7efSGreg Roachuse Fisharebest\Webtrees\Individual; 24a8139624SGreg Roachuse Fisharebest\Webtrees\TestCase; 25202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 26a8139624SGreg Roach 27202c018bSGreg Roach#[CoversClass(CzechMonarchsAndPresidents::class)] 28a8139624SGreg Roachclass CzechMonarchsAndPresidentsTest extends TestCase 29a8139624SGreg Roach{ 30*3ee4c7efSGreg Roach public function testEventsHaveValidDate(): void 31a8139624SGreg Roach { 32*3ee4c7efSGreg Roach $module = new CzechMonarchsAndPresidents(); 33*3ee4c7efSGreg Roach 34*3ee4c7efSGreg Roach $individual = $this->createMock(Individual::class); 35*3ee4c7efSGreg Roach 36*3ee4c7efSGreg Roach foreach ($module->historicEventsAll(language_tag: 'cs') as $gedcom) { 37*3ee4c7efSGreg Roach $fact = new Fact(gedcom: $gedcom, parent: $individual, id: 'test'); 38*3ee4c7efSGreg Roach self::assertTrue(condition: $fact->date()->isOK(), message: 'No date found in: ' . $gedcom); 39*3ee4c7efSGreg Roach } 40a8139624SGreg Roach } 41a8139624SGreg Roach} 42