Commit graph

6 commits

Author SHA1 Message Date
Kunal Mehta e858bda308 Add abstract GadgetRepo and MediaWikiGadgetsDefinition implementation
GadgetRepo is an abstract class based off of the implementation in the
RL2 branch.

It is a singleton that provides basic methods to construct and interact
with Gadget objects.

The MediaWikiGadgetsDefinition class is an implementation of GadgetsRepo
that parses the "MediaWiki:Gadgets-definition" page for gadget
definitions.

Tests were left in place to demonstrate that no functional changes have
been made aside from relocation of code. Some tests should be moved to
separate files in the future.

Bug: T106176
Change-Id: I3e802889f6f495783f4dbac65c2a8cefa824a778
2015-08-01 15:10:07 -07:00
Alex Monk ca8880a634 Set 644 file permissions on .php files
Bug: T104039
Change-Id: I5a040819ae53ce9e4da7ed542ed1f74253129a86
2015-06-27 18:50:31 +01:00
Thiemo Mättig 5b1f8a1e50 Update api module constructors
This also replaces a deprecated function and adds some code docs.

Change-Id: I22c77d370469c10cad5d504b06280e933eeeeeff
2015-06-17 20:42:20 +02:00
Aaron Schulz 11e1c51d6b Conversion to using WAN cache
* Bumped the key version due to key wrapping
* Removed isValidList() gived the key versioning
* Follow up ba1311c323 by making APC viable;
  previously, definition purges would not work

Bug: T93141
Change-Id: I6da3eede044bf4b840b3f9656a1ae8105941dc6b
2015-05-23 23:04:06 +00:00
Max Semenik c2be054951 Improve tests
* Reduce globals usage thanks to core improvements
* Use new assertion that wasn't available before

Change-Id: I9b7fb065ea9e235e6c5e7ea5116ccacac91f8846
2014-06-26 17:34:27 -07:00
Timo Tijhof eca021ed61 tests: Rename file to end in Test.php
Though the hook registration was working fine, the run from
Jenkins was failing.

Jenkins runs like this:

 $ php tests/phpunit/phpunit.php extensions/Gadgets

Which bypasses UnitTestsList and uses auto-discovery within the
given directory of "*.Test.php" files.

Renamed to file to match PHPUnit's internal discovery pattern
and updated the onUnitTestsList callback to use this pattern
as well.

Also updated documentation applied recent code conventions in
this area (extend MediaWikiTestCase).

Change-Id: Iaa52a5eafdebf1529dd02fb1bed89d27c298e0d3
2013-05-01 03:20:39 +02:00