public function setUp() { parent::setUp(); $provider = clone $this->provider; $provider->shouldReceive('getAccessToken')->times(1)->andReturn((object) ['accessToken' => 'mock_access_token_1', 'refreshToken' => 'mock_refresh_token_1', 'expires' => time() + 3600]); $this->connection = new Unsplash\Connection($provider, $this->accessToken); }
public function setUp() { parent::setUp(); $connection = new Unsplash\Connection($this->provider, $this->accessToken); Unsplash\HttpClient::$connection = $connection; $this->total = ["photo_downloads" => 189, "batch_downloads" => 31]; }
public function setUp() { parent::setUp(); // If the class is not cloned, the mock method will get stick // to it $provider = clone $this->provider; // @todo this function doesn't quit work with scopes $provider->shouldReceive('getAuthorizationUrl')->times(1)->andReturn("{getenv(SITE_URI)}/oauth/authorize?client_id=mock_client_id&client_secret=mock_secret&redirect_uri=none"); $provider->shouldReceive('getAccessToken')->times(1)->andReturn((object) ['access_token' => 'mock_access_token_1', 'refresh_token' => 'mock_refresh_token_1', 'expires_in' => time() + 3600]); $this->connection = new Unsplash\Connection($provider); }
public function setUp() { parent::setUp(); $connection = new Unsplash\Connection($this->provider, $this->accessToken); Unsplash\HttpClient::$connection = $connection; }
public function setUp() { parent::setUp(); }
public function setUp() { parent::setUp(); Unsplash\HttpClient::init(['clientId' => 'mock_client_id', 'clientSecret' => 'mock_secret', 'redirectUri' => 'none'], ['access_token' => getenv('ACCESS_TOKEN')]); }