. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Module; use Fisharebest\Webtrees\Fact; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\TestCase; use PHPUnit\Framework\Attributes\CoversClass; #[CoversClass(NewZealandPrimeMinisters::class)] class NewZealandPrimeMinistersTest extends TestCase { public function testEventsHaveValidDate(): void { $module = new NewZealandPrimeMinisters(); $individual = $this->createMock(Individual::class); foreach ($module->historicEventsAll(language_tag: 'en-AU') as $gedcom) { $fact = new Fact(gedcom: $gedcom, parent: $individual, id: 'test'); self::assertTrue($fact->date()->isOK(), 'No date found in: ' . $gedcom); } } }