Provide PHPUnit 4 and 6 compatibility layer
authorKunal Mehta <legoktm@member.fsf.org>
Fri, 2 Mar 2018 10:42:16 +0000 (02:42 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Fri, 6 Apr 2018 21:33:25 +0000 (14:33 -0700)
commitb34260f3794623f34b069aa524c7189c9f8d8d8d
tree96510f80cc31ccf260f60867fe4abc7e49ffa314
parent9de5c6cd22f39acefedf2a9a74fac3b64b83c0c9
Provide PHPUnit 4 and 6 compatibility layer

PHPUnit 6 removed some functions that were heavily used in version 4. To
be able to support both versions for a short time, we'll use a trait to
fill in the missing methods until we drop PHPUnit 4 support.

This trait is included in MediaWikiTestCase so most tests will be able
to benefit from it by default. Otherwise, anything that calls
setExpectedException() or getMock() will need to use it.

Change-Id: I707129e471e960e034e2aa994a467b9dc0239b69
tests/common/TestsAutoLoader.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/PHPUnit4And6Compat.php [new file with mode: 0644]