Skip to content

Commit

Permalink
Enable Mock strategy for HttpRequests
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh authored Jun 5, 2021
1 parent 2968d91 commit f415418
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand Down

0 comments on commit f415418

Please sign in to comment.