Fix assertInternalType deprecation in phpunit 9

This commit is contained in:
Jérémy Derussé 2019-08-01 12:47:31 +02:00
parent 9babf9fdfb
commit aa58789542
No known key found for this signature in database
GPG Key ID: 2083FA5758C473D2
2 changed files with 7 additions and 4 deletions

View File

@ -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()

View File

@ -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);
}