| @@ 72-84 (lines=13) @@ | ||
| 69 | $response['body']->shouldBeString(); |
|
| 70 | } |
|
| 71 | ||
| 72 | function it_returns_response_in_xml_format() |
|
| 73 | { |
|
| 74 | $options = array( |
|
| 75 | 'options' => array( |
|
| 76 | 'Content-Type' => 'application/xml' |
|
| 77 | ) |
|
| 78 | ); |
|
| 79 | ||
| 80 | $response = $this->call('/xml', array(), $options, true); |
|
| 81 | $response['headers']->shouldHaveKey('Content-Type'); |
|
| 82 | $response['headers']['Content-Type']->shouldContain('application/xml'); |
|
| 83 | $response['body']->shouldBeString(); |
|
| 84 | } |
|
| 85 | ||
| 86 | function it_should_be_able_to_accept_query_parameters_as_string() |
|
| 87 | { |
|
| @@ 86-96 (lines=11) @@ | ||
| 83 | $response['body']->shouldBeString(); |
|
| 84 | } |
|
| 85 | ||
| 86 | function it_should_be_able_to_accept_query_parameters_as_string() |
|
| 87 | { |
|
| 88 | $arguments = array( |
|
| 89 | 'Server=httpbin' |
|
| 90 | ); |
|
| 91 | ||
| 92 | $response = $this->call('/response-headers', $arguments, array(), true); |
|
| 93 | $response['headers']->shouldHaveKey('Content-Type'); |
|
| 94 | $response['headers']['Content-Type']->shouldContain('application/json'); |
|
| 95 | $response['body']->shouldBeString(); |
|
| 96 | } |
|
| 97 | ||
| 98 | function it_accepts_query_parameters_as_array() |
|
| 99 | { |
|