dropbox-php-sdk icon indicating copy to clipboard operation
dropbox-php-sdk copied to clipboard

Add some tests

Open cristianoc72 opened this issue 8 years ago • 0 comments

Starting to use this awesome library, I decided to contribute writing some tests.

Thanks to Guzzle mock system we can easily test our library in isolation, without real calls to the Dropbox api. I included the needed methods in src/TestCase.php. Each test class should extend it, to have the mock system already initialized. In this way, we can test if our library send correct requests and if correctly manages the responses, as you can see in tests/DropboxTest.php.

By now, I'm submitting this small PR, testing only Dropbox::getMetadata method. If you like this approach, I can go on with all the other tests.

cristianoc72 avatar Nov 11 '17 06:11 cristianoc72