Skip to content

Commit 48ff11a

Browse files
committed
+ Updating TDD.-
1 parent e513cf4 commit 48ff11a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/ClientTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,20 @@ public function testParseHeaderNotArray()
157157

158158
$this->assertFalse($method->invoke($client, 123));
159159
}
160+
161+
/**
162+
* @test
163+
*/
164+
public function testBasicPostWithHeaders()
165+
{
166+
$client = new Client();
167+
$headers = [
168+
'Accept' => 'application/json',
169+
'Content-Type' => 'text/xml;charset=UTF-8',
170+
];
171+
$response = $client->post('http://www.google.com/', 'test=test&a=b', $headers);
172+
$this->assertEquals(405, $response->getStatusCode());
173+
$this->assertEquals('1.1', $response->getProtocolVersion());
174+
$this->assertNotEmpty($response->getBody());
175+
}
160176
}

0 commit comments

Comments
 (0)