HomePhabricator

New function readAnyFile to read a file with any extension
2c91faed5aedUnpublished

Authored by Seb35 on Sep 24 2017, 6:33 PM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

New function readAnyFile to read a file with any extension

This is mainly used for the main config file farms.yml/.php/.json and will
be useful to implement T162737.

Also starting with this commit I will try to tag new tests (and possibly
some old tests) with “[unit]” when it is clearly a unit test (=assumes the
underlying functions are blackboxes and supposed to work as described) and
“[integration]” when it clearly test an entire stack. This is a step
forward to separate unit and integration tests (T162686).

Also starting with this commit it is recommended to use "@uses ClassName"
instead of "@uses ClassName::methodName" to reduce the burden of maintenance
on the tests. This does not cover "@covers" annotations, which must stay
"@covers ClassName::methodName".

I will document these test-related changes on
https://www.mediawiki.org/wiki/Extension:MediaWikiFarm and subpages.

Change-Id: If01341da9fd6d099baadb61bf51d86eadbbfc919