flatMap(function (string $path): array { preg_match_all('/]|"[^"]*"|\'[^\']*\')*>/s', file_get_contents($path), $matches); return $matches[0]; }); expect($modalDeclarations)->not->toBeEmpty(); $modalDeclarations->each(fn (string $declaration) => expect($declaration)->toContain(':closable="false"')); });