Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin committed Jan 15, 2019
1 parent 224e80e commit 57f2298
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/RequestTest.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -144,11 +144,17 @@ public function testMultipleCheckInHeaders()
->setUserAgent('Hello :)') ->setUserAgent('Hello :)')
->setDownloadOnlyIf([$checkHeaders, 'check']) ->setDownloadOnlyIf([$checkHeaders, 'check'])
->setReturnHeader(true) ->setReturnHeader(true)
->setPost('testpost')
; ;


$result = $request->exec(); $result = $request->exec();


$this->assertTrue(is_array($result->getHeaders())); $this->assertTrue(is_array($result->getHeaders()));
$this->assertSame(null, $result->getCookies()); $this->assertSame(null, $result->getCookies());
$this->assertSame(404, $result->getInfo('http_code'));
$this->assertSame(0, $result->getRequest()->hasError());
$this->assertSame(404, $result->getRequest()->getInfo(CURLINFO_HTTP_CODE));

$result->getRequest()->close();
} }
} }

0 comments on commit 57f2298

Please sign in to comment.