SilverStripe\Omnipay\Tests\Service\TestGatewayFactory
Helper class to inject our desired HTTP client and requests into the newly created gateway instances.
Synopsis
class TestGatewayFactory
extends GatewayFactory
implements
TestOnly
{
- // members
- public static ClientInterface $httpClient;
- public static Request $httpRequest;
- // methods
- public void create()
Hierarchy
Extends
- Omnipay\Common\GatewayFactory
Implements
- SilverStripe\Dev\TestOnly
Members
public
- $httpClient
—
Omnipay\Common\Http\ClientInterface
HTTP client to use for gateways (for unit-tests) - $httpRequest
—
Symfony\Component\HttpFoundation\Request
HTTP request to use for gateways (for unit-tests)