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 223ee4c7efSGreg Roachuse Fisharebest\Webtrees\Fact; 233ee4c7efSGreg Roachuse Fisharebest\Webtrees\Individual; 24a8139624SGreg Roachuse Fisharebest\Webtrees\TestCase; 25202c018bSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 26a8139624SGreg Roach 27202c018bSGreg Roach#[CoversClass(AustrianPresidents::class)] 28a8139624SGreg Roachclass AustrianPresidentsTest extends TestCase 29a8139624SGreg Roach{ 303ee4c7efSGreg Roach public function testEventsHaveValidDate(): void 31a8139624SGreg Roach { 323ee4c7efSGreg Roach $module = new AustrianPresidents(); 333ee4c7efSGreg Roach 343ee4c7efSGreg Roach $individual = $this->createMock(Individual::class); 353ee4c7efSGreg Roach 363ee4c7efSGreg Roach foreach ($module->historicEventsAll(language_tag: 'de') as $gedcom) { 373ee4c7efSGreg Roach $fact = new Fact(gedcom: $gedcom, parent: $individual, id: 'test'); 38*c0f99478SGreg Roach self::assertTrue($fact->date()->isOK(), 'No date found in: ' . $gedcom); 393ee4c7efSGreg Roach } 40a8139624SGreg Roach } 41a8139624SGreg Roach} 42