Skip to content

Commit c33c00c

Browse files
chore: added test for setHost (#162)
1 parent 84fe926 commit c33c00c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/unit/ClientTest.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ public function testGetHost()
7676
$this->assertSame('https://localhost:4010', $client->getHost());
7777
}
7878

79+
public function testSetHost()
80+
{
81+
$client = new Client('https://localhost:4010');
82+
$client->setHost("https://api.test.com");
83+
$this->assertSame('https://api.test.com', $client->getHost());
84+
}
85+
7986
public function testGetHeaders()
8087
{
8188
$client = new Client(
@@ -229,7 +236,7 @@ public function testFormRepeatUrlArgs()
229236
],
230237
];
231238
$result = $this->callMethod($client, 'buildUrl', [$testParams]);
232-
$this->assertEquals($result, 'https://localhost:4010/?thing=stuff&foo=bar&foo=bat&foo=baz');
239+
$this->assertEquals('https://localhost:4010/?thing=stuff&foo=bar&foo=bat&foo=baz', $result);
233240
}
234241

235242
/**

0 commit comments

Comments
 (0)