From bc295bf22d8178c93b5a89f1127bd4f2c3b4f60a Mon Sep 17 00:00:00 2001 From: catch Date: Mon, 16 Mar 2020 07:52:43 +0000 Subject: [PATCH] Issue #3119910 by mondrake: Change hardcoded quote identifier in EntityQueryTest to square brackets --- .../KernelTests/Core/Entity/EntityQueryTest.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php index dc64c0bc924..e6161f8a9cc 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php @@ -1228,16 +1228,17 @@ class EntityQueryTest extends EntityKernelTestBase { $expected = $connection->select("entity_test_mulrev", "base_table"); $expected->addField("base_table", "revision_id", "revision_id"); $expected->addField("base_table", "id", "id"); - $expected->join("entity_test_mulrev__$figures", "entity_test_mulrev__$figures", '"entity_test_mulrev__' . $figures . '"."entity_id" = "base_table"."id"'); - $expected->join("entity_test_mulrev__$figures", "entity_test_mulrev__{$figures}_2", '"entity_test_mulrev__' . $figures . '_2"."entity_id" = "base_table"."id"'); - $expected->addJoin("LEFT", "entity_test_mulrev__$figures", "entity_test_mulrev__{$figures}_3", '"entity_test_mulrev__' . $figures . '_3"."entity_id" = "base_table"."id"'); + $expected->join("entity_test_mulrev__$figures", "entity_test_mulrev__$figures", '[entity_test_mulrev__' . $figures . '].[entity_id] = [base_table].[id]'); + $expected->join("entity_test_mulrev__$figures", "entity_test_mulrev__{$figures}_2", '[entity_test_mulrev__' . $figures . '_2].[entity_id] = [base_table].[id]'); + $expected->addJoin("LEFT", "entity_test_mulrev__$figures", "entity_test_mulrev__{$figures}_3", '[entity_test_mulrev__' . $figures . '_3].[entity_id] = [base_table].[id]'); $expected->condition("entity_test_mulrev__$figures.{$figures}_color", ["blue"], "IN"); $expected->condition("entity_test_mulrev__{$figures}_2.{$figures}_color", ["red"], "IN"); $expected->isNull("entity_test_mulrev__{$figures}_3.{$figures}_color"); $expected->orderBy("base_table.id"); - // Apply table prefixes to the expected SQL. - $expected_string = \Drupal::database()->prefixTables((string) $expected); + // Apply table prefixes and quote identifiers for the expected SQL. + $expected_string = $connection->prefixTables((string) $expected); + $expected_string = $connection->quoteIdentifiers($expected_string); // Resolve placeholders in the expected SQL to their values. $quoted = []; foreach ($expected->getArguments() as $key => $value) {