Unverified Commit dfe9957c authored by alexpott's avatar alexpott

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
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment