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 &amp;0 [<br>&nbsp;&nbsp;&nbsp;&nbsp; 'aggregator_feed' =&gt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'aggregator_item' =&gt; 1,<br>-&nbsp;&nbsp;&nbsp; 'block' =&gt; 37,<br>+&nbsp;&nbsp;&nbsp; 'block' =&gt; 36,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'entity_view_display' =&gt; 58,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'entity_view_mode' =&gt; 14,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'view' =&gt; 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 &amp;0 [<br>&nbsp;&nbsp;&nbsp;&nbsp; 'aggregator_feed' =&gt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'aggregator_item' =&gt; 10,<br>-&nbsp;&nbsp;&nbsp; 'block' =&gt; 28,<br>+&nbsp;&nbsp;&nbsp; 'block' =&gt; 27,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'entity_view_display' =&gt; 35,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'entity_view_mode' =&gt; 13,<br>&nbsp;&nbsp;&nbsp;&nbsp; 'view' =&gt; 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