2222use Sentry \Tracing \TraceId ;
2323use Sentry \Tracing \Transaction ;
2424use Sentry \Tracing \TransactionContext ;
25+ use Symfony \Component \HttpClient \HttpClient ;
2526use Symfony \Component \HttpClient \MockHttpClient ;
2627use Symfony \Component \HttpClient \Response \MockResponse ;
2728use Symfony \Contracts \HttpClient \HttpClientInterface ;
@@ -46,7 +47,7 @@ final class TraceableHttpClientTest extends TestCase
4647
4748 public static function setUpBeforeClass (): void
4849 {
49- if (!self :: isHttpClientPackageInstalled ( )) {
50+ if (!class_exists (HttpClient::class )) {
5051 self ::markTestSkipped ('This test requires the "symfony/http-client" Composer package to be installed. ' );
5152 }
5253 }
@@ -357,13 +358,10 @@ public function testWithOptions(): void
357358 $ this ->assertSame ('GET ' , $ response ->getInfo ('http_method ' ));
358359 $ this ->assertSame ('https://www.example.org/test-page ' , $ response ->getInfo ('url ' ));
359360 }
361+ }
360362
361- private static function isHttpClientPackageInstalled (): bool
363+ if (interface_exists (HttpClientInterface::class)) {
364+ interface TestableHttpClientInterface extends HttpClientInterface, LoggerAwareInterface, ResetInterface
362365 {
363- return interface_exists (HttpClientInterface::class);
364366 }
365367}
366-
367- interface TestableHttpClientInterface extends HttpClientInterface, LoggerAwareInterface, ResetInterface
368- {
369- }
0 commit comments