1 | <?php |
||
16 | abstract class TestCase extends \PHPUnit_Framework_TestCase |
||
17 | { |
||
18 | /** |
||
19 | * @var \GuzzleHttp\Client |
||
20 | */ |
||
21 | private $httpClient; |
||
22 | |||
23 | /** |
||
24 | * @param string $path Mock response file |
||
25 | * @param int $code Response code |
||
26 | * @return Response |
||
27 | */ |
||
28 | public function getMockHttpResponse($path, $code = 200) |
||
44 | |||
45 | /** |
||
46 | * Get a mock HTTP client with history and mock responses |
||
47 | * |
||
48 | * @param mixed $container Responses container |
||
49 | * @param $responses |
||
50 | * @return Client |
||
51 | */ |
||
52 | public function getMockHttpClientWithHistoryAndResponses(&$container, $responses) |
||
62 | |||
63 | /** |
||
64 | * Get HTTP client |
||
65 | * |
||
66 | * @return Client |
||
67 | */ |
||
68 | public function getHttpClient() |
||
76 | } |
||
77 |