@@ 29-36 (lines=8) @@ | ||
26 | $this->mockContainer = MockCollection::getInstance(); |
|
27 | } |
|
28 | ||
29 | public function post($endPoint, $body = []) |
|
30 | { |
|
31 | $this->mockFilter($endPoint); |
|
32 | $request = $this->delegated->post($endPoint, null, $body); |
|
33 | $guzzleResponse = $this->sendWithCheck($request); |
|
34 | ||
35 | return $guzzleResponse->json(); |
|
36 | } |
|
37 | ||
38 | public function postWithJsonBody($endPoint, $body = []) |
|
39 | { |
|
@@ 48-56 (lines=9) @@ | ||
45 | return $guzzleResponse->json(); |
|
46 | } |
|
47 | ||
48 | public function get($endPoint, $parameter = []) |
|
49 | { |
|
50 | $this->mockFilter($endPoint); |
|
51 | $queryString = http_build_query($parameter); |
|
52 | $request = $this->delegated->get("$endPoint?$queryString"); |
|
53 | $guzzleResponse = $this->sendWithCheck($request); |
|
54 | ||
55 | return $guzzleResponse->json(); |
|
56 | } |
|
57 | ||
58 | public function setDefaultOption($keyOrPath, $value) |
|
59 | { |