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