From 8fb223c06cf1db94ea6a81815493288f6ab5f68d Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Tue, 2 Apr 2024 07:52:21 +0200 Subject: [PATCH] Fix TraceableHttpClientTest::testRequestSetsUnknownErrorAsSpanStatusIfResponseStatusCodeIsUnavailable --- tests/Tracing/HttpClient/TraceableHttpClientTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Tracing/HttpClient/TraceableHttpClientTest.php b/tests/Tracing/HttpClient/TraceableHttpClientTest.php index 41dafabc..151cbe87 100644 --- a/tests/Tracing/HttpClient/TraceableHttpClientTest.php +++ b/tests/Tracing/HttpClient/TraceableHttpClientTest.php @@ -208,18 +208,18 @@ public function testRequestSetsUnknownErrorAsSpanStatusIfResponseStatusCodeIsUna 'dsn' => 'http://public:secret@example.com/sentry/1', ]); $client = $this->createMock(ClientInterface::class); - $client->expects($this->once()) + $client->expects($this->exactly(2)) ->method('getOptions') ->willReturn($options); - $transaction = new Transaction(new TransactionContext()); + $transaction = new Transaction(new TransactionContext(), $this->hub); $transaction->initSpanRecorder(); $this->hub->expects($this->once()) ->method('getSpan') ->willReturn($transaction); - $this->hub->expects($this->once()) + $this->hub->expects($this->exactly(2)) ->method('getClient') ->willReturn($client);