Skip to content
Snippets Groups Projects
Unverified Commit dfe9957c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3084477 by quietone, oknate, Spokje, benjifisher, alexpott: Bulk output...

Issue #3084477 by quietone, oknate, Spokje, benjifisher, alexpott: Bulk output entity count errors from migrate_drupal_ui tests
parent 0921d71e
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!16Draft: Resolve #2081585 "History storage"
......@@ -226,17 +226,17 @@ protected function assertUpgrade(array $entity_counts) {
// Check that the expected number of entities is the same as the actual
// number of entities.
$entity_definitions = array_keys(\Drupal::entityTypeManager()->getDefinitions());
ksort($entity_counts);
$expected_count_keys = array_keys($entity_counts);
sort($entity_definitions);
sort($expected_count_keys);
$this->assertSame($expected_count_keys, $entity_definitions);
// Assert the correct number of entities exist.
// Assert the correct number of entities exists.
$actual_entity_counts = [];
foreach ($entity_definitions as $entity_type) {
$real_count = (int) \Drupal::entityQuery($entity_type)->count()->execute();
$expected_count = $entity_counts[$entity_type];
$this->assertSame($expected_count, $real_count, "Found $real_count $entity_type entities, expected $expected_count.");
$actual_entity_counts[$entity_type] = (int) \Drupal::entityQuery($entity_type)->count()->execute();
}
$this->assertSame($entity_counts, $actual_entity_counts);
$plugin_manager = \Drupal::service('plugin.manager.migration');
$version = $this->getLegacyDrupalVersion($this->sourceDatabase);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment