Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When running the test Database › Query logging on Windows, I get the two failed tests:
Correct function in query log. Other database_test.test 1718 DatabaseLoggingTestCase->testEnableLogging()
Correct function in query log. Other database_test.test 1718 DatabaseLoggingTestCase->testEnableLogging()
This is because the filenames returned by debug_backtrace() contain backslashes, e.g.
D:\Program Files\Apache Software Foundation\Apache2.2\htdocs\drupal\includes\database\log.inc.
The attached patch fixes the problem. I chose this solution because of its readability.
Comment | File | Size | Author |
---|---|---|---|
#2 | findCaller-2.patch | 1.23 KB | c960657 |
findCaller.patch | 1.14 KB | c960657 | |
Comments
Comment #1
Crell CreditAttribution: Crell commentedWell bah. Wouldn't it be better to use DIRECTORY_SEPARATOR instead, though, to be properly cross-platform?
Comment #2
c960657 CreditAttribution: c960657 commentedYes, that is better.
Comment #3
Crell CreditAttribution: Crell commentedCode looks good visually. I've not tested it yet, but it's simple enough that it hardly needs extensive testing.
Comment #4
Crell CreditAttribution: Crell commentedPatch applies and tests still run properly under Linux. I have no Windows box to test on, but I see no way in which it would fail there with this patch. Thanks, c!
Comment #5
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.