bigcommerce-api-php
bigcommerce-api-php copied to clipboard
Implement connection interface for mocking data
What?
This request implement ConnectionInterface. I think this is very useful so now you can create custom connection service and mock necessary responses without even having developer account. You just have to create a Client instance and set custom Connection service with setConnection
use Bigcommerce\Api\Client as Bigcommerce;
...
$customConnection = new ConnectionMock();
...
Bigcommerce::configure($creds);
Bigcommerce::setConnection($customConnection);
After that you can use any bundle methods and receive responses mocked in custom ConnectionMock class.