Improve PHPUnit detection code
authorOri Livneh <ori@wikimedia.org>
Mon, 4 Aug 2014 05:48:40 +0000 (22:48 -0700)
committerOri Livneh <ori@wikimedia.org>
Mon, 4 Aug 2014 06:04:45 +0000 (23:04 -0700)
commit555e0b4b3c517cfb565ad275d9600806cd3cd50a
tree89c9798ffc21285c1b945f9ae7c35c72d100d9dd
parent50bcbe6c89e4421768fa16d14ffe9b2aadac1027
Improve PHPUnit detection code

The code that attempts to load PHPUnit is simpler and clearer when rewritten as
a loop that iterates through a set of possible include paths for PHPUnit,
ordered from most to least desirable, and which tries each include path in turn
and then checks if the requisite classes are now loaded.

Also simplify check for PHP version: MediaWiki requires 5.3+, so might as well
assume it.

Change-Id: I9e25d69c1381cf3a87e7df2baf346bc6bb5aa052
tests/phpunit/phpunit.php