1 | <?php |
||
18 | class ClientMock implements ClientInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private static $queue = array(); |
||
24 | |||
25 | /** |
||
26 | * @param string $uri |
||
27 | * @return $this |
||
28 | */ |
||
29 | public function get($uri) |
||
33 | |||
34 | /** |
||
35 | * @param string $uri |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function post($uri) |
||
42 | |||
43 | /** |
||
44 | * @param string $uri |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function put($uri) |
||
51 | |||
52 | /** |
||
53 | * @param string $uri |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function delete($uri) |
||
60 | |||
61 | /** |
||
62 | * @param string $uri |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function patch($uri) |
||
69 | |||
70 | /** |
||
71 | * @param string $token |
||
72 | * @return $this |
||
73 | */ |
||
74 | public function setHeaders($token = null) |
||
78 | |||
79 | /** |
||
80 | * @param array $body |
||
81 | * @return $this |
||
82 | */ |
||
83 | public function setBody($body) |
||
87 | |||
88 | /** |
||
89 | * @return \Httpful\associative|string |
||
90 | * |
||
91 | * @throws \Httpful\Exception\ConnectionErrorException |
||
92 | */ |
||
93 | public function send() |
||
97 | |||
98 | /** |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function asJson() |
||
105 | |||
106 | /** |
||
107 | * @param array $files |
||
108 | * @return $this |
||
109 | */ |
||
110 | public function attach(array $files) |
||
114 | |||
115 | /** |
||
116 | * @param array $params |
||
117 | * @param int $http_code |
||
118 | */ |
||
119 | public static function setMock(array $params = array(), $http_code = 200) |
||
123 | |||
124 | /** |
||
125 | * @param array $params |
||
126 | * @param int $http_code |
||
127 | * @return \stdClass |
||
128 | */ |
||
129 | private static function createMock(array $params = array(), $http_code = 200) |
||
141 | |||
142 | public function setUserAgent($userAgent) |
||
146 | |||
147 | public function setXRealIP($ip) |
||
151 | } |
||
152 |