diff --git a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php b/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php index 71759d0..807305f 100644 --- a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php +++ b/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php @@ -29,9 +29,19 @@ class EntityTestStorageController extends DatabaseStorageController { // Select the actual data. $query->fields('data'); - // Set conditions. - foreach ($conditions as $field => $value) { - $query->condition('data.' . $field, $value); + if ($ids) { + $query->condition("data.id", $ids, 'IN'); + } + if ($conditions) { + foreach ($conditions as $field => $value) { + $query->condition('data.' . $field, $value); + } + } + + // Make sure we return one record for each entity even if no language has + // been specified. + if (empty($conditions['langcode'])) { + $query->condition('data.source_langcode', ''); } return $query;