Verified Commit 1db7f532 authored by Dave Long's avatar Dave Long
Browse files

test: #3550292 Test cleanup for PHPUnit 12 - round 2

By: mondrake
By: dcam
(cherry picked from commit 33a27cd6)
parent c4714979
Loading
Loading
Loading
Loading
Loading
+0 −36
Original line number Diff line number Diff line
@@ -11965,12 +11965,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/tests/src/Kernel/Migrate/MigrateBlockContentStubTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\block_content\\\\Unit\\\\Menu\\\\BlockContentLocalTasksTest\\:\\:getBlockContentListingRoutes\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\breakpoint\\\\BreakpointManager\\:\\:clearCachedDefinitions\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -14560,12 +14554,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/LatestRevisionCheckTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\ModerationInformationTest\\:\\:providerWorkflow\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/content_moderation/tests/src/Unit/ModerationInformationTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\content_moderation\\\\Unit\\\\StateTransitionValidationTest\\:\\:userTransitionsProvider\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -21366,12 +21354,6 @@
	'count' => 1,
	'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\LayoutEntityHelperTraitTest\\:\\:providerSectionsWithInlineComponents\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/modules/layout_builder/tests/src/Unit/LayoutEntityHelperTraitTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\OverridesSectionStorageTest\\:\\:providerTestExtractEntityFromRoute\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -47933,12 +47915,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigFactoryOverrideBaseTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:overrideDataProvider\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Config/ConfigTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Config\\\\ConfigTest\\:\\:validateNameProvider\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
@@ -48306,18 +48282,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Http/ClientFactoryTest.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\LocalTaskIntegrationTestBase\\:\\:assertLocalTasks\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Menu\\\\LocalTaskIntegrationTestBase\\:\\:getLocalTaskManager\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Menu/LocalTaskIntegrationTestBase.php',
];
$ignoreErrors[] = [
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Plugin\\\\CategorizingPluginManager\\:\\:processDefinitionCategory\\(\\) has no return type specified\\.$#',
	'identifier' => 'missingType.return',
+4 −3
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ protected function setUp(): void {
   * Checks block_content listing local tasks.
   */
  #[DataProvider('getBlockContentListingRoutes')]
  public function testBlockContentListLocalTasks($route): void {
  public function testBlockContentListLocalTasks(string $route): void {
    $this->assertLocalTasks($route, [
      0 => [
        'system.admin_content',
@@ -80,9 +80,10 @@ public function testBlockContentListLocalTasks($route): void {
  /**
   * Provides a list of routes to test.
   */
  public static function getBlockContentListingRoutes() {
  public static function getBlockContentListingRoutes(): array {
    return [
      ['entity.block_content.collection', 'system.admin_content'],
      ['entity.block_content.collection'],
      ['system.admin_content'],
    ];
  }

+0 −1
Original line number Diff line number Diff line
@@ -167,7 +167,6 @@ public static function setLatestRevisionFlagTestCases() {
          ],
        ],
        FALSE,
        FALSE,
      ],
      'Overridden load_latest_revision flag does not change with multiple parameters' => [
        [
+4 −4
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ public function testIsModeratedEntityType(): void {
   * Tests is moderated entity.
   */
  #[DataProvider('providerWorkflow')]
  public function testIsModeratedEntity($workflow, $expected): void {
  public function testIsModeratedEntity(?string $workflow, bool $expected): void {
    $moderation_information = new ModerationInformation($this->getEntityTypeManager(), $this->setupModerationBundleInfo('test_bundle', $workflow));

    $entity_type = new ContentEntityType([
@@ -112,7 +112,7 @@ public function testIsModeratedEntity($workflow, $expected): void {
   * Tests get workflow for entity.
   */
  #[DataProvider('providerWorkflow')]
  public function testGetWorkflowForEntity($workflow): void {
  public function testGetWorkflowForEntity(?string $workflow, bool $expected): void {
    $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);
    if ($workflow) {
      $workflow_entity = $this->prophesize(WorkflowInterface::class)->reveal();
@@ -137,7 +137,7 @@ public function testGetWorkflowForEntity($workflow): void {
   * @legacy-covers ::shouldModerateEntitiesOfBundle
   */
  #[DataProvider('providerWorkflow')]
  public function testShouldModerateEntities($workflow, $expected): void {
  public function testShouldModerateEntities(?string $workflow, bool $expected): void {
    $entity_type = new ContentEntityType([
      'id' => 'test_entity_type',
      'bundle_entity_type' => 'entity_test_bundle',
@@ -152,7 +152,7 @@ public function testShouldModerateEntities($workflow, $expected): void {
  /**
   * Data provider for several tests.
   */
  public static function providerWorkflow() {
  public static function providerWorkflow(): array {
    return [
      [NULL, FALSE],
      ['workflow', TRUE],
+6 −2
Original line number Diff line number Diff line
@@ -111,11 +111,13 @@ public static function contextualLinksDataProvider(): array {
   *   The #contextual_links property value array.
   * @param string $id
   *   The serialized representation of the passed links.
   * @param string $theme
   *   The name of the theme the placeholder should pass to the controller.
   *
   * @legacy-covers ::_contextual_links_to_id
   */
  #[DataProvider('contextualLinksDataProvider')]
  public function testContextualLinksToId(array $links, string $id): void {
  public function testContextualLinksToId(array $links, string $id, string $theme): void {
    $this->assertSame($id, _contextual_links_to_id($links));
  }

@@ -126,11 +128,13 @@ public function testContextualLinksToId(array $links, string $id): void {
   *   The #contextual_links property value array.
   * @param string $id
   *   The serialized representation of the passed links.
   * @param string $theme
   *   The name of the theme the placeholder should pass to the controller.
   *
   * @legacy-covers ::_contextual_id_to_links
   */
  #[DataProvider('contextualLinksDataProvider')]
  public function testContextualIdToLinks(array $links, string $id): void {
  public function testContextualIdToLinks(array $links, string $id, string $theme): void {
    $this->assertSame($links, _contextual_id_to_links($id));
  }

Loading