Last modified: 2014-03-05 18:27:51 UTC
Setting $wgDebugToolbar = true in LocalSettings will break one qunit test: mediawiki.api: Basic functionality With the toolbar each api response has a 'debuginfo' section, but the test asume a empty result.
wgDebugToolbar causes all kinds of issues in the front-end due to overlapping of the interface and what not. I think it is poor design that it injects such property in API responses. If you want such information from the API, perhaps it should be a special format (e.g. format=debug) instead of injecting an undocumented parameter in all responses.
wgDebugToolbar works for the api in the same way as for the gui: it added unconditionally the text which was passed to wfDebug and so on.
$wgDebugAPI = true always sets a warning, which gives also false positive
Change 110894 had a related patch set uploaded by Alex Monk: Fix API QUnit tests that are not aware of wgDebugToolbar https://gerrit.wikimedia.org/r/110894
That patch doesn't deal with wgDebugAPI... Not sure there's a nice clean way to do it really...
Change 110894 abandoned by Krinkle: Fix API QUnit tests that are not aware of wgDebugToolbar Reason: This is obsolete now that we've taken the more elegant route of not relying on the server in the first place and limiting the test to testing the client-side logic. Whether it should account for wgDebugToolbar is separate question still, but at least the QUnit run won't be affected by that. https://gerrit.wikimedia.org/r/110894
As of I20b17f256bc5114c6c2c3185653 we no longer interact with api.php from our unit tests, so this bug has become obsolete.