alias(static fn (string $path = ''): string => 'https://k.de/wp-admin/' . $path); Functions\when('add_query_arg')->alias( static fn (array $args, string $url): string => $url . '?' . http_build_query($args) ); Functions\when('get_current_user_id')->justReturn(1); Functions\when('rest_url')->alias(static fn (string $path): string => 'https://k.de/wp-json/' . $path); } protected function tearDown(): void { unset($GLOBALS['wpdb']); parent::tearDown(); } private static function profile(string $id): Profile { return new Profile(id: $id, label: ucfirst($id), tier: Tier::LockOnFailure, capabilities: []); } /** @param (callable(Profile, int): CheckReport)|null $check */ private static function route(?callable $check = null, ?CheckReportStore $reports = null): CheckRoute { return new CheckRoute( new Compatibility([self::profile('divi'), self::profile('pods')]), $check === null ? static fn () => self::fail('no check expected') : $check(...), static fn (Profile $profile): CheckReportStore => $reports ?? self::fail('no store expected') ); } private static function report(): CheckReport { return new CheckReport('r1', 'd', 1, '3.3.9.2', '0.6.0', 'k', []); } /** The "