Skip to content

Commit

Permalink
test: Client::setApiTimeout
Browse files Browse the repository at this point in the history
Co-authored-by: dongyu <[email protected]>

see also #209
  • Loading branch information
weakish committed Jun 29, 2020
1 parent 3a095cd commit 7b7da13
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/APITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,14 @@ public function testGzipCompatibility() {
Client::delete("/classes/TestObject/{$resp['objectId']}");
}

public function testRequestTimeout() {
$getTimeout = function() { return static::$apiTimeout; };
$getApiTimeout = $getTimeout->bindTo(null, Client::class);
$this->assertEquals(15, $getApiTimeout());
Client::setApiTimeout(3);
$this->assertEquals(3, $getApiTimeout());
Client::setApiTimeout(15); // revert to default
}

}

0 comments on commit 7b7da13

Please sign in to comment.