Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

furang
Copy link

@furang furang commented Dec 6, 2021

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.

@furang furang changed the title Patch connection interface Implement connection interface for mocking data Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant