Verified Commit 033a864f authored by Dave Long's avatar Dave Long
Browse files

task: #3530453 Remove deprecated use of Assert::isType()

By: mstrelan
By: mondrake
By: smustgrave
By: xjm
By: catch
(cherry picked from commit 35283e39)
parent a735e53c
Loading
Loading
Loading
Loading
Loading
+0 −63
Original line number Diff line number Diff line
@@ -24402,13 +24402,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateLookupTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 5,
	'path' => __DIR__ . '/modules/migrate/tests/src/Unit/MigrateSourceTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\migrate\\\\Unit\\\\StubSourceGeneratorPlugin\\:\\:getCacheCounts\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -48548,13 +48541,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/AccessResultTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Access/CsrfTokenGeneratorTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Access\\\\TestController\\:\\:accessAllow\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -48621,26 +48607,12 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/AssetResolverTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\CssCollectionRendererUnitTest\\:\\:providerTestRender\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Asset/CssOptimizerUnitTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Asset\\\\CssOptimizerUnitTest\\:\\:providerTestOptimize\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -49135,13 +49107,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/DrupalKernel/ValidateHostnameTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 2,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Enhancer/ParamConversionEnhancerTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityConstraintViolationListTest\\:\\:setupEntity\\(\\) return type with generic interface Drupal\\\\Core\\\\Field\\\\FieldItemListInterface does not specify its types\\: T$#',
	'identifier' => 'missingType.generics',
@@ -49532,13 +49497,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormBuilderTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 5,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormCacheTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormElementHelperTest\\:\\:getElementByNameProvider\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -49713,13 +49671,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormTestBase.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 7,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Form/FormValidatorTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Form\\\\FormValidatorTest\\:\\:providerTestHandleErrorsWithLimitedValidation\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -49865,13 +49816,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/EntityRevisionParamConverterTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 4,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\ParamConverter\\\\ParamConverterManagerTest\\:\\:providerTestSetRouteParameterConverters\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -50736,13 +50680,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Call to deprecated method isType\\(\\) of class PHPUnit\\\\Framework\\\\Assert\\:
https\\://github\\.com/sebastianbergmann/phpunit/issues/6052$#',
	'identifier' => 'staticMethod.deprecated',
	'count' => 5,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Utility/LinkGeneratorTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Utility\\\\TokenTest\\:\\:providerTestReplaceEscaping\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+2 −2
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ public function testCount(): void {
    $container = new ContainerBuilder();
    $cache = $this->createMock(CacheBackendInterface::class);
    $cache->expects($this->any())->method('set')
      ->with($this->isType('string'), $this->isType('int'), $this->isType('int'));
      ->with($this->isString(), $this->isInt(), $this->isInt());
    $container->set('cache.migrate', $cache);
    \Drupal::setContainer($container);

@@ -214,7 +214,7 @@ public function testCountCacheKey(): void {
    $container = new ContainerBuilder();
    $cache = $this->createMock(CacheBackendInterface::class);
    $cache->expects($this->any())->method('set')
      ->with('test_key', $this->isType('int'), $this->isType('int'));
      ->with('test_key', $this->isInt(), $this->isInt());
    $container->set('cache.migrate', $cache);
    \Drupal::setContainer($container);

+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ public function testGenerateSeedOnGet(): void {

    $this->sessionMetadata->expects($this->once())
      ->method('setCsrfTokenSeed')
      ->with($this->isType('string'));
      ->with($this->isString());

    $this->assertIsString($this->generator->get());
  }
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ protected function setUp(): void {
    $file_url_generator = $this->createMock(FileUrlGeneratorInterface::class);
    $file_url_generator->expects($this->any())
      ->method('generateString')
      ->with($this->isType('string'))
      ->with($this->isString())
      ->willReturnCallback(function ($uri) {
         return 'generated-relative-url:' . $uri;
      });
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ protected function setUp(): void {
    $this->fileUrlGenerator = $this->createMock(FileUrlGeneratorInterface::class);
    $this->fileUrlGenerator->expects($this->any())
      ->method('generateString')
      ->with($this->isType('string'))
      ->with($this->isString())
      ->willReturnCallback(function ($uri) {
        return 'generated-relative-url:' . $uri;
      });
Loading