diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php index b8b71ef..fae7943 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityDefinitionUpdateTest.php @@ -442,6 +442,8 @@ public function testBaseFieldDeleteWithExistingData() { '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)); // Check that the field storage definition is marked for purging. @@ -510,6 +512,8 @@ public function testBundleFieldDeleteWithExistingData() { '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)); // Check that the field definition is marked for purging.