Mock Google API for Testing purposes in Laravel

Job ID: 35542252

Budget: $30 – $250 USD

I have integrated the Google Drive API through out a web app that I am working on. Basically when a file is uploaded, it is saved to the server drive but then copied to a google drive account, via the Google API, at the time of the upload.

At the same time that it is copied to the google drive, a watcher is registered for the file so that notifications can be sent back to the server when ever the file is modified or changed in google drive.

I have also integrated the calendar api so that when an event is added to the sites calendar, the event is also posted to the google calendar, (similarly when it is edited or deleted, he action is reflected on the google calendar).

Writing tests for all this functionality, sans the google api, was pretty straight forward. Tests to see if the file was uploaded, to see if the info was saved to the database, etc. However, once I plugged in the google api, my tests fail because now I have integrated the google api and so when all this functionality is tested, it will try and make google api calls.

So basically I just want to mock the the google api stuff so that the tests, I have in place now, don’t break.

I also need to know, are you able to do this without having access to my code? I mean are you able to write something generic that I can retrofit to what I have, and then provide support on how I can implement along with good explanation of how the code works?
Related categories: PHP Software Architecture MySQL Laravel PHPUnit