Commit graph

1800 commits

Author SHA1 Message Date
jenkins-bot
1068762721 Merge "Make FormatMetadata accept RequestContext, instead of hard coding $wgLang." 2013-10-29 18:25:57 +00:00
jenkins-bot
966fb8da62 Merge "Add an interface for getting "standard" file metadata." 2013-10-29 18:23:10 +00:00
Brian Wolff
b6aa32bf01 Make FormatMetadata accept RequestContext, instead of hard coding $wgLang.
The point of this patch is to allow someone to use this class
to get the metadata formatted in the language of their choice
(by passing in an appropriate context object), instead of
forcing $wgLang. This is important for future evil plans I
have.

To do this, some of the previous static methods were changed
to non-static. I checked and fixed all users of such methods
(including extensions). Some of the implied private methods
were also explicitly marked as such.

Change-Id: I673d99fa36280d1baf14c150f4aaff039676830a
2013-10-29 16:12:15 +00:00
Brian Wolff
2cbd926e34 Add an interface for getting "standard" file metadata.
Currently file metadata is handler dependant. However they usually
end up extracting the same type of data (author, date, etc) plus
one or two handler specific things. This adds a handler independent
interface for getting metadata that is likely to be common for all
types of file (At the moment, this is the exif/iptc/xmp information)

This commit used to also contain stuff adding parser functions,
which is now split to its own commit. This commit is needed
by a bunch of other commits, in particular I0d957891e0.

Change-Id: I43d9252f69dc5b8ba0b848cf40aa1b97329c85ae
2013-10-29 16:12:07 +00:00
Adam Roses Wight
7f51cf22f9 Minor optimization to the AutoLoader
When MediaWiki autoloading fails, we should gracefully return false.
Instead, we have been calling strtolower roughly 1,000 times in the hope
of finding a case-insensitive match.

This patch preserves the legacy case-insensitivity, but improves its
performance by approximately 100x, by storing the case-insensitive class
lookups as a static variable.

There is a new global $wgAutoloadAttemptLowercase which will switch the
behavior if desired.  The default is to support case-insensitive loading.

Change-Id: Ifb12e05614a48390b730167e9d4ddcd8545db764
2013-10-28 21:39:57 +00:00
jenkins-bot
d395421c24 Merge "Remove unneeded methods in tests" 2013-10-28 16:55:41 +00:00
addshore
c739d8c4fc Remove unneeded methods in tests
Change-Id: Ia2da4027f2cc4a3aaff02695bab35de32a33ed60
2013-10-28 16:48:56 +00:00
Kunal Mehta
c14f418924 Test for Status::hasMessage
Change-Id: I080e006fa6a7d8ad68bdf827c4bab7d0ea160230
2013-10-25 17:53:18 -07:00
jenkins-bot
c83d5d7864 Merge "FormatJson: Remove whitespace from empty arrays and objects" 2013-10-25 22:33:12 +00:00
jenkins-bot
a34dd90a36 Merge "Fix Tidy quietly breaking TOC disabling" 2013-10-25 19:44:11 +00:00
Max Semenik
d6f673c115 Fix Tidy quietly breaking TOC disabling
The functionality was introduced in I2889bcb9
but doesn't work in presence if Tidy.

Change-Id: Ibf96cc3bc94fac75fd92ec5b9205011fcb68f0c2
2013-10-25 19:04:51 +00:00
Kunal Mehta
2041294b14 Add some missing :'s
Change-Id: I4f48fdd3e5d81b8a0a34505795a7ab318c931a47
2013-10-24 18:16:21 -07:00
Mwalker
86d8a5f46f Merge "@covers tags for unit tests" 2013-10-25 01:11:03 +00:00
Mwalker
b06e844804 Merge "@covers tags for more test classes" 2013-10-25 01:09:58 +00:00
Mwalker
3b0fec7d48 Merge "@covers tags for the rest of test files.." 2013-10-25 01:07:13 +00:00
addshore
9a06bc75f9 add basic Status unit test
Adds unit tests for some of the more basic
parts of the Status class

has todos at the bottom of the file for all other
methods that need to be tested

Change-Id: Ic2f2abafb44ef86af207c7595e440672dfcf4f1e
2013-10-24 23:25:08 +01:00
addshore
caec5f920a @covers tags for the rest of test files..
Change-Id: I0fafe80531325a412472ab7c9fc6d81c861b3751
2013-10-24 21:38:08 +01:00
addshore
aea1b27db0 @covers tags for more test classes
Change-Id: I19d49c279646a4b4c595700e53b790ba4eb9521e
2013-10-24 20:35:04 +01:00
jenkins-bot
8cabb5f777 Merge "Make TOC hideable" 2013-10-24 19:22:32 +00:00
jenkins-bot
035095eb2f Merge "Cleanup Api phpunit Tests" 2013-10-24 18:29:35 +00:00
jenkins-bot
eb3317fadc Merge "Add more ApiFormat format tests" 2013-10-24 18:27:03 +00:00
jenkins-bot
6c539fc9e6 Merge "@covers tags for maintenance tests" 2013-10-24 18:19:52 +00:00
Mwalker
27e4a897a2 Merge "@covers tags for the rest of /media/* tests" 2013-10-24 18:17:06 +00:00
addshore
dc18b813e8 Cleanup Api phpunit Tests
- Splits multiple classes into individual files
- Adds @covers tags
- Fixes scope

Change-Id: I7d2816d3574fa53a2aaa8e2a84b7a7ecdd245252
2013-10-24 19:17:01 +01:00
addshore
86adcfb8b7 @covers tags for maintenance tests
Change-Id: Ica5f351f71ee5fccae97560f2de6d75fc5da721b
2013-10-24 19:12:22 +01:00
addshore
9577968280 Add more ApiFormat format tests
Adds tests for Json and wddx formats
Add @covers tags
Fixes some comments
Fixes scope

Change-Id: I5f22097ddcaeb917f856ba7aa0cb793caa17925e
2013-10-24 19:07:05 +01:00
addshore
98a0e7d68b @covers tags for the rest of /media/* tests
Change-Id: I12879baf7810648d3ec0789feac5af364d5696f7
2013-10-24 19:04:38 +01:00
Mwalker
daf6ce8c5f Merge "@covers for ApiQuery stuff" 2013-10-24 18:01:24 +00:00
addshore
749599fc3c @covers tags for unit tests
Change-Id: I2b486b38326bf23bd379efba2142034e24c0745f
2013-10-24 18:22:57 +01:00
addshore
9c540db2df @covers tags for inclues/*Test
Change-Id: Id28acdd8fe0028bf1e46344cfed131076c8f4c95
2013-10-24 11:54:02 +01:00
addshore
2a982e0e13 Cleanup skins/SiteBarTest and @todo/covers
Change-Id: I501d04ddbeee23539337b68142ee6c1371a63d98
2013-10-24 10:10:37 +00:00
addshore
d442e88e55 @covers for ApiQuery stuff
Change-Id: Id8a89abd545d8e2a95b1d246776049b9c888e53c
2013-10-24 11:04:00 +01:00
addshore
4bb09bbca5 @covers for all GlobalFunc tests
Also split 2 tests off into their correct test classes,
this methods are clearly no longer global functions

Change-Id: I482433f3099e72507a766e85d9576ff36e58b9ad
2013-10-24 10:00:55 +00:00
addshore
de7af7ac2c Fix scope on all /phpunit test methods
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
2013-10-24 10:31:32 +02:00
addshore
c40786cba2 Cleanup tests/includes/media
- Adds @covers tags
- fixes comments
- fixes scope
- adds @todos
- split files per class

Change-Id: Id5aaa20769725a96f22fb838d376697c250874a5
2013-10-24 08:12:42 +00:00
jenkins-bot
c1becbb85d Merge "Remove all instances of the word "iff"" 2013-10-23 18:16:48 +00:00
Tim Starling
d1bc243f65 Remove all instances of the word "iff"
It's elitist mathematical jargon. In all cases dealt with here, it adds
no additional meaning compared to "if", beyond what was already obvious
from context. Thus, its only purpose is to smugly demonstrate that the
author attended their second-year mathematics classes, at the expense of
causing confusion for everyone who doesn't have such a background.

If you really think you need to convey extra information beyond what
"if" gives you, the English language contains plenty of devices for doing
so, without resorting to neologisms.

Change-Id: Iae21095d02ec2935c10e94f532235c2671c115b1
2013-10-23 10:56:54 -07:00
jenkins-bot
c24ac2c87d Merge "Fix doc error in new incr test" 2013-10-23 17:01:14 +00:00
Matthew Flaschen
613c451286 Fix doc error in new incr test
It covers all implementations of the abstract class method BagOStuff::incr.

Change-Id: I763985477b8564857a0905019c4485dd36f84539
2013-10-23 16:56:05 +00:00
addshore
17c1e91238 General cleanup of Parser tests
- Fixes scope
 - Adds covers tags

Change-Id: I6024f2f7cc7a1812a417c6c389b0a15addde0b5e
2013-10-23 12:26:15 +00:00
addshore
5bf45af50e Cleanup MagicVariableTest
- Give methods scope
 - Make providers static
 - Add @covers todo
 - Merge the Providers file that is only used in here

Change-Id: I60a6bbd5a8ad3d9d414de493ec2b083f52114a7b
2013-10-23 07:58:14 +00:00
jenkins-bot
5f5a114412 Merge "Test BagOStuff->incr method" 2013-10-22 23:47:25 +00:00
Matthew Flaschen
7cff82a118 Test BagOStuff->incr method
Change-Id: I3b72f19df82ee302dee47dcf22b69ed9bb6ff8e0
2013-10-22 15:48:50 -04:00
addshore
46a17d0fc3 Cleanup /languages/* tests
This change:
 - Adds method scope
 - adds @covers tags
 - adds various @todos
 - fixes some comments

Before the changes tests ran with:
   1383 tests, 1412 assertions 10 skips
After changes the results remain the same

Change-Id: Iee57447bdb47026952ef5dcce6fed5dad0f80e52
2013-10-22 12:32:29 +02:00
addshore
fb16eb2abe Add more @covers tags and test cleanup
Other cleanup includes
 - Adding method scopes
 - Fixing php comments
 - Adding todos

Change-Id: I0a231008e6a59110ffcab6af1bd8c4d3ee13f21d
2013-10-22 08:59:42 +00:00
Timo Tijhof
a8ed966ee4 Fix typo erronously -> erroneously
Follows-up 1aed5382d2.

Change-Id: I1e0cbc3dfa529816446c3aec6372eb2b821ee540
2013-10-21 19:29:16 +02:00
addshore
4e941cf4ca Add @covers tags for more tests
Change-Id: Iff3af78e9b41c445b7f066b6c0d0f4a87d2d6c4e
2013-10-21 11:28:39 +02:00
parent5446
0f88ab3d4e Added more Message parameter functions
Similar to numParams(), added functions for other parameters
that can be formatted by the Language class. Adds functions for
expiry, size, timePeriod, duration, and bitrate parameters so
that the formatting doesn't have to be done at the caller.

Change-Id: I7b435fcc11824ead55e4c0f5512418187eae9a6f
2013-10-19 14:34:14 +02:00
Mwalker
78016e4b5f Merge "Add @covers tags for /content files" 2013-10-18 18:50:15 +00:00
Mwalker
68fa69e3be Merge "Add @covers for GenderCache + MessageCache tests" 2013-10-18 18:48:17 +00:00