Skip to content

Commit

Permalink
minor #32858 [PhpUnitBridge] Fix deprecation assertInternalType - 4.4…
Browse files Browse the repository at this point in the history
… (jderusse)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix deprecation assertInternalType - 4.4

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32844
| License       | MIT
| Doc PR        | NA

This PR fixes PhpUnit deprecation :
> assertInternalType() is deprecated and will be removed in PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(), assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(), assertIsResource(), assertIsString(), assertIsScalar(), assertIsCallable(), or assertIsIterable() instead

follow #32846 for 4.4 branch

Commits
-------

51ba665 Fix assertInternalType deprecation in phpunit 9
  • Loading branch information
nicolas-grekas committed Aug 1, 2019
2 parents 122a7cf + 51ba665 commit e712241
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -11,10 +11,13 @@

namespace Symfony\Component\HttpClient\Tests;

use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
use Symfony\Contracts\HttpClient\Test\HttpClientTestCase as BaseHttpClientTestCase;

abstract class HttpClientTestCase extends BaseHttpClientTestCase
{
use ForwardCompatTestTrait;

public function testToStream()
{
$client = $this->getHttpClient(__FUNCTION__);
Expand All @@ -28,7 +31,7 @@ public function testToStream()
$this->assertFalse(feof($stream));
$this->assertTrue(rewind($stream));

$this->assertInternalType('array', json_decode(fread($stream, 1024), true));
$this->assertIsArray(json_decode(fread($stream, 1024), true));
$this->assertSame('', fread($stream, 1));
$this->assertTrue(feof($stream));
}
Expand Down

0 comments on commit e712241

Please sign in to comment.