13ee4c7efSGreg Roach<?php 23ee4c7efSGreg Roach 33ee4c7efSGreg Roach/** 43ee4c7efSGreg Roach * webtrees: online genealogy 53ee4c7efSGreg Roach * Copyright (C) 2023 webtrees development team 63ee4c7efSGreg Roach * This program is free software: you can redistribute it and/or modify 73ee4c7efSGreg Roach * it under the terms of the GNU General Public License as published by 83ee4c7efSGreg Roach * the Free Software Foundation, either version 3 of the License, or 93ee4c7efSGreg Roach * (at your option) any later version. 103ee4c7efSGreg Roach * This program is distributed in the hope that it will be useful, 113ee4c7efSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 123ee4c7efSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 133ee4c7efSGreg Roach * GNU General Public License for more details. 143ee4c7efSGreg Roach * You should have received a copy of the GNU General Public License 153ee4c7efSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 163ee4c7efSGreg Roach */ 173ee4c7efSGreg Roach 183ee4c7efSGreg Roachdeclare(strict_types=1); 193ee4c7efSGreg Roach 203ee4c7efSGreg Roachnamespace Fisharebest\Webtrees\Module; 213ee4c7efSGreg Roach 223ee4c7efSGreg Roachuse Fisharebest\Webtrees\Fact; 233ee4c7efSGreg Roachuse Fisharebest\Webtrees\Individual; 243ee4c7efSGreg Roachuse Fisharebest\Webtrees\TestCase; 253ee4c7efSGreg Roachuse PHPUnit\Framework\Attributes\CoversClass; 263ee4c7efSGreg Roach 273ee4c7efSGreg Roach#[CoversClass(NewZealandPrimeMinisters::class)] 283ee4c7efSGreg Roachclass NewZealandPrimeMinistersTest extends TestCase 293ee4c7efSGreg Roach{ 303ee4c7efSGreg Roach public function testEventsHaveValidDate(): void 313ee4c7efSGreg Roach { 323ee4c7efSGreg Roach $module = new NewZealandPrimeMinisters(); 333ee4c7efSGreg Roach 343ee4c7efSGreg Roach $individual = $this->createMock(Individual::class); 353ee4c7efSGreg Roach 363ee4c7efSGreg Roach foreach ($module->historicEventsAll(language_tag: 'en-AU') 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 } 403ee4c7efSGreg Roach } 413ee4c7efSGreg Roach} 42