Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I don't know why we would change a usage in the simpletest module but not in the system module. ModuleTestBase isn't specifically for testing the global function. AFAIK it would be nice to have a test somewhere for the global function. So, I don't know what we want here.
diff --git a/core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php b/core/tests/Drupal/KernelTests/Core/Database/DatabaseLegacyTest.php
old mode 100755
new mode 100644
Comments
Comment #2
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedComment #3
sidharthapInitial try.
Comment #4
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedComment #5
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs commentedComment #6
JayKandari#5 Looks good.
Only found 1 instance of "db_find_tables()" call in
core/modules/simpletest/simpletest.module:666
Comment #8
cilefen CreditAttribution: cilefen commentedI don't know why we would change a usage in the simpletest module but not in the system module. ModuleTestBase isn't specifically for testing the global function. AFAIK it would be nice to have a test somewhere for the global function. So, I don't know what we want here.
(edited)
Comment #9
xjmComment #12
volegerReroll for 8.6.x
Also replaced 2 usages. See interdiff
Comment #14
Mile23Patch no longer applies.
Comment #15
volegerPostponed on #2991542: Introduce a DatabaseLegacyTest class for deprecation testing and #2991337: Document the recommended ways to obtain the database connection object
Comment #16
volegerSet PP-1 because #2991542: Introduce a DatabaseLegacyTest class for deprecation testing had fixed.
Comment #17
volegerComment #18
volegerComment #19
volegerRerolled
Added legacy test
Used local cached database connection as mentioned at #2991337-21: Document the recommended ways to obtain the database connection object
Comment #20
mondrakeLooks ready. RTBC
Comment #22
andypostmost of time this function used with "%" so please change test to use wildcard
Comment #23
mondrakeFails on SQLite and Pgsql
Comment #24
andypostThe fail is unrelated, the fix for failure is #2996436: Follow-up to fix DatabaseLegacyTest::testDbRenameTable
Re-rolled patch to check wildcard ability
Comment #25
mondrakeWe can just use
assertEquals
here that is doing a comparison without taking into account the sequence of the keys in the array (see #2925750: EntityDefinitionUpdateTest fails with contrib db driver). That should fix the Pgsql test failure.Comment #26
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commentedAdded a patch with above mentioned change by #25
Comment #27
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commentedInterdiff
Comment #28
volegerLooks good
Comment #29
volegerComment #30
volegerStill applicable
Comment #31
alexpottCommitted b083070 and pushed to 8.7.x. Thanks!
Fixed the file mode being changed by the patch.