Commit graph

15 commits

Author SHA1 Message Date
Mark A. Hershberger
780ba99ac8 random eol w/s annoys me. 2011-06-26 20:04:38 +00:00
Brion Vibber
13b1da185e * (bug 29426) Fix wrong use of Block::load's second parameter in BlockTest
It was accidentally passing a username where it should have passed a user ID, causing PostgreSQL's stricter comparisons to fail, while MySQL's allowed it to run without complaint but returned bad results.
Of course that bug got hidden by the test.... testing the wrong thing... :)

Now correctly loads using the user id instead of name, checks the proper return values, and actually compares the right object.
2011-06-16 17:58:26 +00:00
Brion Vibber
15445510ff Fix for BlockTest -- when setup ran multiple times, the block entry wouldn't get re-saved and we'd end up with null or 0 as our block id.
By first removing any matching block, we can re-insert it at will and have a fresh working block to test.
2011-06-15 20:43:24 +00:00
Platonides
3399ffa031 BlockTest changes $wgContLang, too. 2011-06-14 21:27:07 +00:00
Chad Horohoe
cb569f094f Fix some of the weird freaky interaction between ApiBlockTest and BlockTest.
* By using the same summary for both, we allow both sets of tests to pass with --filter Block
* Just testing includes/BlockTest.php still passes
2011-06-03 06:22:18 +00:00
Chad Horohoe
6f7e2eb71e Followup r89311: rv unrelated changes 2011-06-02 01:28:30 +00:00
Chad Horohoe
89529808d8 Make user right selection in installer actually work, thanks Krinkle for spotting this 2011-06-02 01:26:26 +00:00
Chad Horohoe
5004f09bfa Exclude Block tests until somebody fixes them, also cache listTables() result so we can skip some queries 2011-06-01 22:54:33 +00:00
Antoine Musso
6642e733c6 Use the correct ID when retrieving a block
The ID might be different than the one you expect. Since r88755 the tables
are no more dropped and recreated, thus the autoincrement pointer is not
reset.  A previous test could have raised that pointer, thus the id might
be above the expected value.
This patch track the block ID inserted and use it in the assertion.
2011-05-28 21:25:29 +00:00
Brion Vibber
536fad8f90 * (bug 29116) Fix regression breaking CheckUser extension
Fixes regression from r84475 and friends which made Block->load() and its new front-end Block::newFromTarget() fail when an empty string was passed in as the IP / $vagueTarget parameter to indicate skipping IP-based lookups.
Added phpunit test cases to confirm that both Block->load() and Block::newFromTarget() work when given null (already ok), '' (as done from CheckUser), or false (not seen, but perfectly legit sounding).
Adjusted comparisons to work as expected.
2011-05-24 21:04:50 +00:00
Platonides
fe7ee51f3c Follow up r87210 2011-05-01 23:02:27 +00:00
Happy-melon
cf08b61b1b Follow-up r84475: fixing the warning is easy enough... :D Also some random tweaks to Database.php documentation. 2011-03-21 23:03:11 +00:00
Platonides
84709ae3b3 Follow up r79109.
Don't setup/destroy for databaseless tests.
Make needsDB() return based on the DocComment.
Delayed db init until the test is run, so that it isn't set for excluded tests (the exclusion is done after all the classes are instantiated).
2010-12-29 15:01:47 +00:00
X!
c4befaf28c Add test to supplement Bug 26425 (followup to r79013) 2010-12-28 19:27:34 +00:00
X!
a9ff87335f Add BlockTest unit test 2010-12-28 19:12:27 +00:00