Laravel 10 – how to mock static function in other class:
in CommonHelper class: class CommonHelper { public static function getValue(string $category, string $name) { } } in MyService class: public function getContentOrtherService(): array { ... $this->lineUrl = CommonHelper::getValue(CommonHelper::LINE, CommonHelper::BASE_ENDPOINT); ... } catch (Exception $e) { return $contents; } } in…