Skip to content

Commit 7c30f10

Browse files
Tweaked tests
1 parent fd5f28d commit 7c30f10

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

rector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@
8686
$parameters->set('auto_import_names', true);
8787
$parameters->set('import_short_classes', false);
8888
$parameters->set('import_doc_blocks', false);
89-
$parameters->set('php_version_features', '7.1');
89+
$parameters->set('php_version_features', '7.2');
9090
$parameters->set('paths', [__DIR__.'/src', __DIR__.'/tests']);
91-
$parameters->set('sets', ['php52', 'php53', 'php54', 'php55', 'php56', 'php70', 'php71', 'phpunit40', 'phpunit50', 'phpunit60', 'phpunit70', 'phpunit75']);
91+
$parameters->set('sets', ['php52', 'php53', 'php54', 'php55', 'php56', 'php70', 'php71', 'php72', 'phpunit40', 'phpunit50', 'phpunit60', 'phpunit70', 'phpunit75', 'phpunit80']);
9292

9393
$services = $containerConfigurator->services();
9494
$services->set(ArrayKeyExistsTernaryThenValueToCoalescingRector::class);

tests/ResponseMediatorTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Bitbucket\Exception\RuntimeException;
1717
use Bitbucket\HttpClient\Message\ResponseMediator;
1818
use GuzzleHttp\Psr7\Response;
19-
use function GuzzleHttp\Psr7\stream_for;
19+
use GuzzleHttp\Psr7\Utils;
2020
use PHPUnit\Framework\TestCase;
2121

2222
/**
@@ -29,7 +29,7 @@ public function testGetContent(): void
2929
$response = new Response(
3030
200,
3131
['Content-Type' => 'application/json'],
32-
stream_for('{"foo": "bar"}')
32+
Utils::streamFor('{"foo": "bar"}')
3333
);
3434

3535
$this->assertSame(['foo' => 'bar'], ResponseMediator::getContent($response));
@@ -41,7 +41,7 @@ public function testGetContentNotJson(): void
4141
$response = new Response(
4242
200,
4343
[],
44-
stream_for($body)
44+
Utils::streamFor($body)
4545
);
4646

4747
$this->expectException(RuntimeException::class);
@@ -56,7 +56,7 @@ public function testGetContentInvalidJson(): void
5656
$response = new Response(
5757
200,
5858
['Content-Type' => 'application/json'],
59-
stream_for($body)
59+
Utils::streamFor($body)
6060
);
6161

6262
$this->expectException(RuntimeException::class);
@@ -71,7 +71,7 @@ public function testGetErrrorMessageInvalidJson(): void
7171
$response = new Response(
7272
200,
7373
['Content-Type' => 'application/json'],
74-
stream_for($body)
74+
Utils::streamFor($body)
7575
);
7676

7777
$this->assertNull(ResponseMediator::getErrorMessage($response));

0 commit comments

Comments
 (0)