In trying to remove deprecated method usage, I've found that quite a few tests in Wikibase.git are really complicated. Mostly this seems to be caused by trying to stuff tests for structurally very different behaviours in the same test method and data provider. There is no need to do this at all. The need for a control structure in a test method is very rare, and should be carefully considered. There is a lot of good material on the topic, though if you cannot find the time to look into that, just keep that simple guideline in mind: no control structures. Please keep the tests (and production code) simple!


Jeroen De Dauw - http://www.bn2vs.com
Software craftsmanship advocate
Evil software architect at Wikimedia Germany