Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #11 from jostrander/master
Browse files Browse the repository at this point in the history
Add getClient() method for additional API calls
  • Loading branch information
frankdejonge committed Aug 29, 2015
2 parents 1e97f3b + a0f2ed4 commit 011ffbf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CopyAdapter.php
Expand Up @@ -42,6 +42,16 @@ public function __construct(API $client, $prefix = null)
$this->client = $client;
$this->setPathPrefix($prefix);
}

/**
* Get the Copy API instance.
*
* @return API
*/
public function getClient()
{
return $this->client;
}

/**
* Check weather a file exists.
Expand Down
8 changes: 8 additions & 0 deletions tests/CopyAdapterTests.php
Expand Up @@ -274,4 +274,12 @@ public function testCopyFail(Copy $adapter, $mock)
$mock->shouldReceive('copy')->andThrow('Exception');
$this->assertFalse($adapter->copy('something', 'something'));
}

/**
* @dataProvider copyProvider
*/
public function testGetClient($adapter, $mock)
{
$this->assertEquals($mock, $adapter->getClient());
}
}

0 comments on commit 011ffbf

Please sign in to comment.