Skip to content

Commit

Permalink
Fix CR issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ste93cry committed Apr 6, 2020
1 parent e0ec205 commit 1f2f430
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/ClientBuilderTest.php
Expand Up @@ -4,10 +4,10 @@

namespace Sentry\Tests;

use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Uri;
use Http\Client\Common\Plugin as PluginInterface;
use Http\Client\HttpAsyncClient as HttpAsyncClientInterface;
use Http\Discovery\MessageFactoryDiscovery;
use Http\Discovery\UriFactoryDiscovery;
use Http\Message\MessageFactory as MessageFactoryInterface;
use Http\Message\UriFactory as UriFactoryInterface;
use Http\Promise\FulfilledPromise;
Expand Down Expand Up @@ -67,7 +67,7 @@ public function testSetUriFactory(): void
$uriFactory = $this->createMock(UriFactoryInterface::class);
$uriFactory->expects($this->once())
->method('createUri')
->willReturn(new Uri('http://example.com'));
->willReturn(UriFactoryDiscovery::find()->createUri('http://www.example.com'));

$client = ClientBuilder::create(['dsn' => 'http://public@example.com/sentry/1'])
->setUriFactory($uriFactory)
Expand All @@ -87,7 +87,7 @@ public function testSetMessageFactory(): void
$messageFactory = $this->createMock(MessageFactoryInterface::class);
$messageFactory->expects($this->once())
->method('createRequest')
->willReturn(new Request('POST', ''));
->willReturn(MessageFactoryDiscovery::find()->createRequest('POST', 'http://www.example.com'));

$client = ClientBuilder::create(['dsn' => 'http://public@example.com/sentry/1'])
->setMessageFactory($messageFactory)
Expand All @@ -113,7 +113,7 @@ public function testSetTransport(): void
->setTransport($transport)
->getClient();

$client->captureMessage('foo');
$this->assertSame('ddb4a0b9ab1941bf92bd2520063663e3', $client->captureMessage('foo'));
}

/**
Expand Down

0 comments on commit 1f2f430

Please sign in to comment.