Fix assertInternalType deprecation in phpunit 9
This commit is contained in:
parent
9babf9fdfb
commit
aa58789542
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Symfony\Component\Intl\Tests;
|
||||
|
||||
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
|
||||
use Symfony\Component\Intl\Currencies;
|
||||
|
||||
/**
|
||||
@ -18,6 +19,8 @@ use Symfony\Component\Intl\Currencies;
|
||||
*/
|
||||
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 @@ class CurrenciesTest extends ResourceBundleTestCase
|
||||
*/
|
||||
public function testGetRoundingIncrement($currency)
|
||||
{
|
||||
$this->assertInternalType('numeric', Currencies::getRoundingIncrement($currency));
|
||||
$this->assertIsNumeric(Currencies::getRoundingIncrement($currency));
|
||||
}
|
||||
|
||||
public function provideCurrenciesWithNumericEquivalent()
|
||||
|
@ -87,7 +87,7 @@ class RegistryTest extends TestCase
|
||||
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 @@ class RegistryTest extends TestCase
|
||||
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 @@ class RegistryTest extends TestCase
|
||||
public function testAllWithNoMatch()
|
||||
{
|
||||
$workflows = $this->registry->all(new \stdClass());
|
||||
$this->assertInternalType('array', $workflows);
|
||||
$this->assertIsArray($workflows);
|
||||
$this->assertCount(0, $workflows);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user