Simulated WordPress options. */ public static array $options = []; /** @var array Track function call counts. */ public static array $callCounts = []; /** @var array> Track arguments passed to functions. */ public static array $callArgs = []; /** * Reset all state. Call in setUp()/tearDown(). */ public static function reset(): void { self::$options = []; self::$callCounts = []; self::$callArgs = []; } /** * Record a function call for later assertions. */ public static function recordCall(string $function, mixed ...$args): void { self::$callCounts[$function] = (self::$callCounts[$function] ?? 0) + 1; self::$callArgs[$function][] = $args; } /** * Get call count for a function. */ public static function getCallCount(string $function): int { return self::$callCounts[$function] ?? 0; } }