fixing tests

This commit is contained in:
thefosk
2014-01-07 05:42:58 +01:00
parent 42edc2b2e3
commit 63c05ad022

View File

@@ -88,6 +88,8 @@ class UnirestTest extends UnitTestCase
$response = Unirest::get("http://httpbin.org/delay/1"); $response = Unirest::get("http://httpbin.org/delay/1");
$this->assertEqual(200, $response->code); $this->assertEqual(200, $response->code);
Unirest::timeout(null); // Cleaning timeout for the other tests
} }
public function testDefaultHeader() public function testDefaultHeader()
@@ -100,7 +102,6 @@ class UnirestTest extends UnitTestCase
$properties = get_object_vars($headers); $properties = get_object_vars($headers);
$this->assertTrue(array_key_exists("Hello", $properties)); $this->assertTrue(array_key_exists("Hello", $properties));
$this->assertEqual("custom", $headers->Hello); $this->assertEqual("custom", $headers->Hello);
$response = Unirest::get("http://httpbin.org/get"); $response = Unirest::get("http://httpbin.org/get");
$this->assertEqual(200, $response->code); $this->assertEqual(200, $response->code);
@@ -108,7 +109,6 @@ class UnirestTest extends UnitTestCase
$properties = get_object_vars($headers); $properties = get_object_vars($headers);
$this->assertTrue(array_key_exists("Hello", $properties)); $this->assertTrue(array_key_exists("Hello", $properties));
$this->assertEqual("custom", $headers->Hello); $this->assertEqual("custom", $headers->Hello);
Unirest::clearDefaultHeaders(); Unirest::clearDefaultHeaders();
$response = Unirest::get("http://httpbin.org/get"); $response = Unirest::get("http://httpbin.org/get");