From aa587895422782f5156d7fa28c3278f04530a6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Thu, 1 Aug 2019 12:47:31 +0200 Subject: [PATCH] Fix assertInternalType deprecation in phpunit 9 --- src/Symfony/Component/Intl/Tests/CurrenciesTest.php | 5 ++++- src/Symfony/Component/Workflow/Tests/RegistryTest.php | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php index 102cf3f4c7bb..612e017b0ab4 100644 --- a/src/Symfony/Component/Intl/Tests/CurrenciesTest.php +++ b/src/Symfony/Component/Intl/Tests/CurrenciesTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Intl\Tests; +use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait; use Symfony\Component\Intl\Currencies; /** @@ -18,6 +19,8 @@ */ class CurrenciesTest extends ResourceBundleTestCase { + use ForwardCompatTestTrait; + // The below arrays document the state of the ICU data bundled with this package. private static $currencies = [ @@ -693,7 +696,7 @@ public function testGetFractionDigits($currency) */ public function testGetRoundingIncrement($currency) { - $this->assertInternalType('numeric', Currencies::getRoundingIncrement($currency)); + $this->assertIsNumeric(Currencies::getRoundingIncrement($currency)); } public function provideCurrenciesWithNumericEquivalent() diff --git a/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/src/Symfony/Component/Workflow/Tests/RegistryTest.php index 21c532ee7d87..1fd15d6c3c1e 100644 --- a/src/Symfony/Component/Workflow/Tests/RegistryTest.php +++ b/src/Symfony/Component/Workflow/Tests/RegistryTest.php @@ -87,7 +87,7 @@ public function testGetWithNoMatch() public function testAllWithOneMatchWithSuccess() { $workflows = $this->registry->all(new Subject1()); - $this->assertInternalType('array', $workflows); + $this->assertIsArray($workflows); $this->assertCount(1, $workflows); $this->assertInstanceOf(Workflow::class, $workflows[0]); $this->assertSame('workflow1', $workflows[0]->getName()); @@ -96,7 +96,7 @@ public function testAllWithOneMatchWithSuccess() public function testAllWithMultipleMatchWithSuccess() { $workflows = $this->registry->all(new Subject2()); - $this->assertInternalType('array', $workflows); + $this->assertIsArray($workflows); $this->assertCount(2, $workflows); $this->assertInstanceOf(Workflow::class, $workflows[0]); $this->assertInstanceOf(Workflow::class, $workflows[1]); @@ -107,7 +107,7 @@ public function testAllWithMultipleMatchWithSuccess() public function testAllWithNoMatch() { $workflows = $this->registry->all(new \stdClass()); - $this->assertInternalType('array', $workflows); + $this->assertIsArray($workflows); $this->assertCount(0, $workflows); }