. */ 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(USPresidents::class)] class USPresidentsTest extends TestCase { public function testEventsHaveValidDate(): void { $module = new USPresidents(); $individual = $this->createMock(Individual::class); foreach ($module->historicEventsAll(language_tag: 'en-US') as $gedcom) { $fact = new Fact(gedcom: $gedcom, parent: $individual, id: 'test'); self::assertTrue(condition: $fact->date()->isOK(), message: 'No date found in: ' . $gedcom); } } }