diff --git a/src/TestCase.php b/src/TestCase.php index c249afc..2097f9d 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -2,6 +2,8 @@ namespace Omnipay\Tests; +use Http\Discovery\HttpClientDiscovery; +use Http\Discovery\Strategy\MockClientStrategy; use Mockery as m; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use Omnipay\Common\Http\Client; @@ -34,6 +36,13 @@ abstract class TestCase extends PHPUnitTestCase /** @var HttpRequest */ private $httpRequest; + protected function setUp(): void + { + parent::setUp(); + + HttpClientDiscovery::prependStrategy(MockClientStrategy::class); + } + /** * Converts a string to camel case *