Commit graph

6 commits

Author SHA1 Message Date
Thalia 8807b07d37 Add basic test for ApiVisualEditor::execute
Bug: T299791
Change-Id: I1217f065572565f076ecb24271c3b5af34e74121
2022-01-24 12:28:49 +00:00
Thiemo Kreuz a3a738b4f9 Rewrite ApiVisualEditor::getAvailableNamespaceIds()
For readability. The current implementation is a sequence of
7 (!) array_…() function calls. It is also not free from bugs.
If one of the two inputs (ExtensionRegistry and Config) specifies
namespaces by e.g. canonical name, but the other by number,
the two are not properly merged. It should be possible to use
configuration to disable a namespace that would otherwise be
enabled. This currently works only if both use the same array
keys.

Bug: T291727
Change-Id: I2671f391cdc510da21eda8a1dc5ed4d2513a378a
2021-10-01 14:10:08 +02:00
DannyS712 492fcfbd9f Don't include null in the namespaces where VE can be enabled
Bug: T291728
Change-Id: I2cb168a21c559e61bf2c9e881d46f7f23110e826
2021-09-29 16:23:48 +00:00
Thiemo Kreuz 3484f1927d Add unit tests for static ApiVisualEditor methods
Done for I2cb168a.

Change-Id: I29f8c127ea19abd3449ee0e2742c3ddcc4db23ba
2021-09-28 10:49:47 +02:00
Thiemo Kreuz 61fac2fb44 Add a first PHPUnit test for SpecialCollabPad
Change-Id: I871f3d9616a40300ee306f58b4bae5a58b57b53f
2021-08-26 12:09:59 +02:00
Thiemo Kreuz d78af2c0e9 Add a first trivial PHPUnit test
This is more a proof of concept. The PHP code in this codebase
is rather small, but not trivial, and worth being covered by
tests.

Change-Id: I20c713c3c3be5d289947a343cd4fbf5256234a4a
2021-08-20 15:20:35 +00:00