Fix broken unit tests since 2025.07
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3542816. -->
Reported by: [mradcliffe](https://www.drupal.org/user/157079)
Related to !25
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Unit tests have been failing since at least 2025.07.13 probably due to unrelated migrate changes upstream.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Drupal\Tests\aggregator\Kernel\Migrate\d6\MigrateBlockTest::testBlockMigration<br>
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</p>
<p>Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d6\UpgradeTest::testUpgrade</p>
<pre>Failed asserting that two arrays are identical.<br>--- Expected<br>+++ Actual<br>@@ @@<br> Array &0 [<br> 'aggregator_feed' => 1,<br> 'aggregator_item' => 1,<br>- 'block' => 37,<br>+ 'block' => 36,<br> 'entity_view_display' => 58,<br> 'entity_view_mode' => 14,<br> 'view' => 16,<br> ]</pre><pre>Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d7\UpgradeTest::testUpgrade<br>Failed asserting that two arrays are identical.<br>--- Expected<br>+++ Actual<br>@@ @@<br> Array &0 [<br> 'aggregator_feed' => 1,<br> 'aggregator_item' => 10,<br>- 'block' => 28,<br>+ 'block' => 27,<br> 'entity_view_display' => 35,<br> 'entity_view_mode' => 13,<br> 'view' => 16,<br> ]</pre><h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>- Adjust block counts or change the test to assert that the block entities exist if they should exist<br>
- Fix the TypeError</p>
<p>Probably these tests should be deprecated and removed in a future version as migrate_drupal will be deprecated and removed.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Determine if we only need to adjust the entity counts or not.</p>
issue