Laravel: how to mock dependency injection class methods
问题 I'm using the GitHub API through a Laravel API Wrapper. I've created a dependency injection class. How can I mock the exists method within the App\Http\GitHub.php class? App\Http\GitHub.php : use GrahamCampbell\GitHub\GitHubManager; class Github { public $username; public $repository; public function __construct($username, $repository, GitHubManager $github) { $this->username = $username; $this->repository = $repository; $this->github = $github; } public static function make($username,