Skip to content

Commit

Permalink
Add RequestsTest_Transport_Base::testPURGEWithData()
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean90 committed Jul 28, 2016
1 parent 9fcb3ee commit 6c9b76b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Transport/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,18 @@ public function testPURGE() {
$this->assertEquals(200, $request->status_code);
}

public function testPURGEWithData() {
$data = array(
'test' => 'true',
'test2' => 'test',
);
$request = Requests::request(httpbin('/purge'), array(), $data, 'PURGE', $this->getOptions());
$this->assertEquals(200, $request->status_code);

$result = json_decode($request->body, true);
$this->assertEquals(array('test' => 'true', 'test2' => 'test'), $result['form']);
}

public function testRedirects() {
$request = Requests::get(httpbin('/redirect/6'), array(), $this->getOptions());
$this->assertEquals(200, $request->status_code);
Expand Down

0 comments on commit 6c9b76b

Please sign in to comment.