Commit graph

15 commits

Author SHA1 Message Date
This, that and the other
5c4681012e UI for adding and removing change tags on revisions and log entries
There is a new special page, Special:EditTags, which is very similar to
Special:RevisionDelete in a lot of ways. In fact, the SpecialEditTags class
started off as a copy-paste of SpecialRevisiondelete.

You invoke this special page by going to an article history page, checking
some revisions, and clicking "Edit tags of selected revisions". Then you
pick the modifications you want to make and click "Apply". Very much like
the revision deletion workflow.

I had to restructure some of the Action routing code, which was only
designed to handle revision deletion. Also removing some code from
SpecialRevisiondelete which didn't work as advertised in the first place,
and definitely doesn't work now.

Change-Id: I7d3ef927b5686f6211bc5817776286ead19d916b
2015-04-15 18:31:12 +00:00
Timo Tijhof
b4bac102b6 tests: Clean up file headers
* Remove redundant @licence/@license from test suite files.
  They already have full licence headers. And @licence raises a
  warning in Doxygen.

* Fix weird messes of comments inside comments and other things.

Change-Id: I38da8ca76330f72b8dc22b0ecf1ea69d5ea55ede
2015-04-01 00:17:12 +01:00
jenkins-bot
4be623a6b3 Merge "Revert "Make an empty "?action=" parameter default to "view""" 2014-10-11 17:23:21 +00:00
Brion VIBBER
4587cd5c71 Revert "Make an empty "?action=" parameter default to "view""
Breaks all non-view actions on dev wikis, something's not right with the patch.

This reverts commit a90b7ea969.

Change-Id: Ib9a5eb07ef48716df193fbb62a86c13e5c80dafd
2014-10-11 17:15:49 +00:00
Thiemo Mättig
e1a4fe4be5 Add test for canUseWikiPage special case to ActionTest
Change-Id: I6b037d4aa9101a3a416cdf3bd1e26f14b056b4f7
2014-10-11 00:30:21 +00:00
Thiemo Mättig
a90b7ea969 Make an empty "?action=" parameter default to "view"
When no action is given, e.g. in
https://en.wikipedia.org/wiki/URL
the action defaults to "view". Just like you called
https://en.wikipedia.org/wiki/URL?action=view

But when the action is empty, e.g.
https://en.wikipedia.org/wiki/URL?action=
you get an error message telling you that "the action specified"
can not be "recognized". Wait. I did not "specified" an action.
That's why I left the parameter empty. It doesn't make much sense
to have an empty action name that's different from the "view"
default, right? From the users point of view I expect the empty
string to behave like null/undefined.

Change-Id: I331924d9223e597293bc8285f0c330edf08e429b
2014-10-10 21:52:07 +02:00
Jeff Janes
7e3fcc39ea PHPUnit: Add Database tags
Several unit tests access the database, but did not declare
themselves in the Database @group.  This causes
"make databaseless" to fail needlessly.  Add the
missing tags.

tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/actions/ActionTest.php
tests/phpunit/includes/specials/ImageListPagerTest.php
tests/phpunit/includes/specials/SpecialMIMESearchTest.php
tests/phpunit/includes/title/MediaWikiPageLinkRendererTest.php

Other than ActionTest.php, these also are problematic in 1.23

Change-Id: I7c1c957e2194c13e48b7ba68d7529e5d89901875
2014-09-16 18:42:27 -07:00
Thiemo Mättig
5043b4993b Add tests for IE workarounds to ActionTest
Change-Id: Iafaa3266e57f22f108c0253053103681bd88bd10
2014-07-22 13:55:44 +02:00
Thiemo Mättig
e2675eaeef Add tests for NULL to ActionTest
NULL should default to 'view'. But both the exists check and the
factory should fail when asked for a NULL action.

Change-Id: I5751489eed890bb44101f2a4ef73002bff68b207
2014-07-22 13:55:44 +02:00
Thiemo Mättig
1ccdd5bec0 Add tests for disabled actions in ActionTest
Change-Id: I2c742fca0fa87604c1d503b938ecc495aafd8376
2014-07-22 13:55:44 +02:00
Thiemo Mättig
d3e26d2906 Add more test cases to ActionTest
1. The 'dummy' test case already tested ucfirst(), but strtolower()
was not tested. The new 'DUMMY' tests fixes that.

2. Add a new test where the requested action is false.

3. Refactored the dummy builder a bit to make it easier to reuse.

Change-Id: Id7d9adac064b307b04bf6accb83ffd7f217a857c
2014-07-22 12:37:05 +02:00
umherirrender
53c420e278 Fixed spacing
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma

Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
2014-07-20 21:41:41 +02:00
umherirrender
2b021dc48a Fixed spacing
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
2014-07-19 23:12:10 +02:00
Thiemo Mättig
bf0d2a110a Improve tests for Action::exists
Change-Id: I905fd8e88ff625cd88c672ddac7a5ac4f4a94b36
2014-07-18 15:33:21 +00:00
Thiemo Mättig
20a1087bd5 Add ActionTest for static Action methods
Change-Id: Ifea52280486b8aa29fbab42e4c7d3ea907849b52
2014-07-18 15:29:35 +02:00