Skip to content
Snippets Groups Projects
Unverified Commit 89c66eed 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

(cherry picked from commit dfe9957c)
parent 3cbce90f
No related branches found
No related tags found
4 merge requests!1285Issue #3240655 by elfakhar Aligne the active border,!541Issue #3123070: Fix 'PSR2.Classes.PropertyDeclaration.Underscore' coding standard,!463Resolve #3205025 "Class align center for media",!386Allow multiple vocabularies in the taxonomy filter
......@@ -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