Skip to content

Commit 8fdeec8

Browse files
committed
test: fix ClientTest relative URI rejected by Guzzle 7.x stricter validation
Newer Guzzle 7.x patch versions reject relative URIs (e.g. '/') when no base_uri is configured, throwing InvalidArgumentException before the MockHandler is reached. Replace with an absolute URI so the mock handler intercepts correctly on all Guzzle 7.x versions.
1 parent 2648ae2 commit 8fdeec8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Http/ClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testSendRequest()
3737

3838
$this->assertSame(
3939
$someResponse,
40-
$client->sendRequest(new Request('GET', '/'))
40+
$client->sendRequest(new Request('GET', 'https://api.yoti.com/'))
4141
);
4242

4343
$this->assertEquals(30, $someHandler->getLastOptions()['timeout']);
@@ -138,6 +138,6 @@ private function sendRequestAndThrow(\Throwable $exception)
138138

139139
$client = new Client(['handler' => $someHandlerStack]);
140140

141-
$client->sendRequest(new Request('GET', '/'));
141+
$client->sendRequest(new Request('GET', 'https://api.yoti.com/'));
142142
}
143143
}

0 commit comments

Comments
 (0)