Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private function buildClient($name = null)
if (isset($name)) {
$this->path[] = $name;
}
$client = new Client($this->host, $this->headers, $this->version, $this->path);
$client = new Client($this->host, $this->headers, $this->version, $this->path, $this->curlOptions);
$this->path = [];
return $client;
}
Expand Down
7 changes: 5 additions & 2 deletions test/unit/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ public function testConstructor()

public function test_()
{
$client = $this->client->_('test');
$client = new MockClient($this->host, $this->headers, '/v3', null, ['foo' => 'bar']);
$client = $client->_('test');

$this->assertAttributeEquals(['test'], 'path', $client);
$this->assertAttributeEquals(['foo' => 'bar'], 'curlOptions', $client);
}

public function test__call()
Expand Down Expand Up @@ -106,4 +109,4 @@ public function testGetCurlOptions()
$client = new Client('https://localhost:4010', null, null, null, null);
$this->assertSame([], $client->getCurlOptions());
}
}
}