Skip to content

Commit 1938a54

Browse files
minor #32857 [PhpUnitBridge] Fix deprecation assertInternalType - 4.3 (jderusse)
This PR was merged into the 4.3 branch. Discussion ---------- [PhpUnitBridge] Fix deprecation assertInternalType - 4.3 | Q | A | ------------- | --- | Branch? | 4.3 | 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.3 branch Commits ------- aa58789 Fix assertInternalType deprecation in phpunit 9
2 parents 0ebf7ee + aa58789 commit 1938a54

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/Symfony/Component/Intl/Tests/CurrenciesTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111

1212
namespace Symfony\Component\Intl\Tests;
1313

14+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1415
use Symfony\Component\Intl\Currencies;
1516

1617
/**
1718
* @group intl-data
1819
*/
1920
class CurrenciesTest extends ResourceBundleTestCase
2021
{
22+
use ForwardCompatTestTrait;
23+
2124
// The below arrays document the state of the ICU data bundled with this package.
2225

2326
private static $currencies = [
@@ -693,7 +696,7 @@ public function testGetFractionDigits($currency)
693696
*/
694697
public function testGetRoundingIncrement($currency)
695698
{
696-
$this->assertInternalType('numeric', Currencies::getRoundingIncrement($currency));
699+
$this->assertIsNumeric(Currencies::getRoundingIncrement($currency));
697700
}
698701

699702
public function provideCurrenciesWithNumericEquivalent()

src/Symfony/Component/Workflow/Tests/RegistryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testGetWithNoMatch()
8787
public function testAllWithOneMatchWithSuccess()
8888
{
8989
$workflows = $this->registry->all(new Subject1());
90-
$this->assertInternalType('array', $workflows);
90+
$this->assertIsArray($workflows);
9191
$this->assertCount(1, $workflows);
9292
$this->assertInstanceOf(Workflow::class, $workflows[0]);
9393
$this->assertSame('workflow1', $workflows[0]->getName());
@@ -96,7 +96,7 @@ public function testAllWithOneMatchWithSuccess()
9696
public function testAllWithMultipleMatchWithSuccess()
9797
{
9898
$workflows = $this->registry->all(new Subject2());
99-
$this->assertInternalType('array', $workflows);
99+
$this->assertIsArray($workflows);
100100
$this->assertCount(2, $workflows);
101101
$this->assertInstanceOf(Workflow::class, $workflows[0]);
102102
$this->assertInstanceOf(Workflow::class, $workflows[1]);
@@ -107,7 +107,7 @@ public function testAllWithMultipleMatchWithSuccess()
107107
public function testAllWithNoMatch()
108108
{
109109
$workflows = $this->registry->all(new \stdClass());
110-
$this->assertInternalType('array', $workflows);
110+
$this->assertIsArray($workflows);
111111
$this->assertCount(0, $workflows);
112112
}
113113

0 commit comments

Comments
 (0)