diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index fae7943..d0f5a1c 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -441,10 +441,9 @@ public function testBaseFieldDeleteWithExistingData() { 'delta' => '0', 'new_base_field_value' => $entity->new_base_field->value, ]; - $actual = (array) $result[0]; - // Sort the expected and actual array by key before asserting, to prevent - // that a different sequence of the columns in the table affect the check. - $this->assertSame(ksort($expected), ksort($actual)); + // Use assertEquals and not assertSame here to prevent that a different + // sequence of the columns in the table will affect the check. + $this->assertEquals($expected, (array) $result[0]); // Check that the field storage definition is marked for purging. $deleted_storage_definitions = \Drupal::service('entity_field.deleted_fields_repository')->getFieldStorageDefinitions(); @@ -511,10 +510,9 @@ public function testBundleFieldDeleteWithExistingData() { 'delta' => '0', 'new_bundle_field_value' => $entity->new_bundle_field->value, ]; - $actual = (array) $result[0]; - // Sort the expected and actual array by key before asserting, to prevent - // that a different sequence of the columns in the table affect the check. - $this->assertSame(ksort($expected), ksort($actual)); + // Use assertEquals and not assertSame here to prevent that a different + // sequence of the columns in the table will affect the check. + $this->assertEquals($expected, (array) $result[0]); // Check that the field definition is marked for purging. $deleted_field_definitions = \Drupal::service('entity_field.deleted_fields_repository')->getFieldDefinitions();