minor #32858 [PhpUnitBridge] Fix deprecation assertInternalType - 4.4 (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
-------

51ba6651aa Fix assertInternalType deprecation in phpunit 9
This commit is contained in:
Nicolas Grekas 2019-08-01 13:52:20 +02:00
commit e7122418e1

View File

@ -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__);
@ -28,7 +31,7 @@ abstract class HttpClientTestCase extends BaseHttpClientTestCase
$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));
}