Fix broken unit tests since 2025.07

Created on 24 August 2025, 2 months ago

Problem/Motivation

Unit tests have been failing since at least 2025.07.13 probably due to unrelated migrate changes upstream.

Steps to reproduce

Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateBlockTest::testBlockMigration
TypeError: PHPUnit\Framework\Assert::assertEquals(): Argument #3 ($message) must be of type string, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /builds/project/aggregator/web/core/modules/migrate/tests/src/Kernel/MigrateTestBase.php on line 206

Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d6\UpgradeTest::testUpgrade

Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 [
     'aggregator_feed' => 1,
     'aggregator_item' => 1,
-    'block' => 37,
+    'block' => 36,
     'entity_view_display' => 58,
     'entity_view_mode' => 14,
     'view' => 16,
 ]
Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d7\UpgradeTest::testUpgrade
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
 Array &0 [
     'aggregator_feed' => 1,
     'aggregator_item' => 10,
-    'block' => 28,
+    'block' => 27,
     'entity_view_display' => 35,
     'entity_view_mode' => 13,
     'view' => 16,
 ]

Proposed resolution

- Adjust block counts or change the test to assert that the block entities exist if they should exist
- Fix the TypeError

Probably these tests should be deprecated and removed in a future version as migrate_drupal will be deprecated and removed.

Remaining tasks

Determine if we only need to adjust the entity counts or not.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mradcliffe USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024