Skip to content

Commit

Permalink
fix tests for lower deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Jul 11, 2022
1 parent 8a824d7 commit 27d9d53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
12 changes: 0 additions & 12 deletions tests/Tracing/HttpClient/Fixtures/StreamableResponseInterface.php

This file was deleted.

7 changes: 3 additions & 4 deletions tests/Tracing/HttpClient/TraceableResponseTest.php
Expand Up @@ -6,7 +6,6 @@

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Sentry\SentryBundle\Tests\Tracing\HttpClient\Fixtures\StreamableResponseInterface;
use Sentry\SentryBundle\Tracing\HttpClient\TraceableResponse;
use Sentry\State\HubInterface;
use Sentry\Tracing\Span;
Expand Down Expand Up @@ -86,7 +85,7 @@ public function testGetContent(): void
{
$span = new Span();
$httpClient = new MockHttpClient(new MockResponse('foobar'));
$response = new TraceableResponse($httpClient, $httpClient->request('GET', '/'), $span);
$response = new TraceableResponse($httpClient, $httpClient->request('GET', 'https://www.example.org/'), $span);

$this->assertSame('foobar', $response->getContent());
$this->assertNotNull($span->getEndTimestamp());
Expand All @@ -96,7 +95,7 @@ public function testToArray(): void
{
$span = new Span();
$httpClient = new MockHttpClient(new MockResponse('{"foo":"bar"}'));
$response = new TraceableResponse($this->client, $httpClient->request('GET', '/'), $span);
$response = new TraceableResponse($this->client, $httpClient->request('GET', 'https://www.example.org/'), $span);

$this->assertSame(['foo' => 'bar'], $response->toArray());
$this->assertNotNull($span->getEndTimestamp());
Expand All @@ -123,7 +122,7 @@ public function testGetInfo(): void
public function testToStream(): void
{
$httpClient = new MockHttpClient(new MockResponse('foobar'));
$response = new TraceableResponse($this->client, $httpClient->request('GET', '/'), null);
$response = new TraceableResponse($this->client, $httpClient->request('GET', 'https://www.example.org/'), null);

if (!method_exists($response, 'toStream')) {
$this->markTestSkipped('The TraceableResponse::toStream() method is not supported');
Expand Down

0 comments on commit 27d9d53

Please sign in to comment.