Commit graph

7 commits

Author SHA1 Message Date
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