Clean-up of MediaWikiTestCase::checkHasGzip()
authorOri Livneh <ori@wikimedia.org>
Wed, 1 Jun 2016 17:32:37 +0000 (10:32 -0700)
committerOri Livneh <ori@wikimedia.org>
Wed, 1 Jun 2016 17:44:23 +0000 (10:44 -0700)
commitb19ff388467ce9fb09ebb32655dc401130102f64
treeb2ee63fad33796d16d15dda1c0dffb923d744a75
parent873def9a99386db0adb78438774855955b0d9f74
Clean-up of MediaWikiTestCase::checkHasGzip()

* Move the method from MediaWikiTestCase to DumpTestCase. Only subclasses of
  DumpTestCase use it, and it is not sufficiently well-designed to be a part
  of MediaWikiTestCase. (I'd want something more generic, like
  "$this->markSkippedUnlessExecutable()", rather than a method dedicated solely
  to establishing the availability of the gzip binary.)
* Fix it so that the result of the check is actually cached. It wasn't,
  previously, because of how 'static' works in PHP.
* Be content with checking that gzip is in $PATH instead of actually executing
  it.

Change-Id: Iec687a6bfe75912e1875afc3abb4fb6197a0b3aa
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/maintenance/DumpTestCase.php