From 11c4be53ea1a08a853e0160b91d6fe6afcaae36d Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Thu, 4 Jul 2024 09:58:42 +0100 Subject: [PATCH] Issue #3458922 by quietone, alexpott, longwave: Fix index test in LocalesLocationAddIndexUpdateTest::testExistingIndex --- .../src/Functional/LocalesLocationAddIndexUpdateTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php b/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php index a63960f87372..8c471ffd1bbd 100644 --- a/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php +++ b/core/modules/locale/tests/src/Functional/LocalesLocationAddIndexUpdateTest.php @@ -102,13 +102,10 @@ public function testExistingIndex(): void { // Run updates and test them. $this->runUpdates(); + // Ensure the update runs successfully even if an index existed prior to + // the update. $schema = \Drupal::database()->schema(); $this->assertTrue($schema->indexExists('locales_location', 'type_name')); - - // Ensure that index specification matches our expectations. - $introspect_index_schema = new \ReflectionMethod(get_class($schema), 'introspectIndexSchema'); - $index_schema = $introspect_index_schema->invoke($schema, 'locales_location'); - $this->assertSame(['type', 'name'], $index_schema['indexes']['type_name']); } } -- GitLab