aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/ZipDirectoryReaderTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Move files with tests to reflect the codeSiebrand Mazeland2013-11-071-85/+0
| | | | Change-Id: I7949457fb1ad056dc3db09b43ecf73bc8a61d5a8
* Fix scope on all /phpunit test methodsaddshore2013-10-241-10/+10
| | | | Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af
* Add more @covers tags and test cleanupaddshore2013-10-221-1/+2
| | | | | | | | | Other cleanup includes - Adding method scopes - Fixing php comments - Adding todos Change-Id: I0a231008e6a59110ffcab6af1bd8c4d3ee13f21d
* Add @covers tags for more testsaddshore2013-10-211-0/+4
| | | | Change-Id: Iff3af78e9b41c445b7f066b6c0d0f4a87d2d6c4e
* Update formattingSiebrand Mazeland2013-02-141-3/+3
| | | | | | 3 of n. Change-Id: I62ad009018c54da6cf081c334e44eb98a3c72695
* tests: always call parent setUpAntoine Musso2012-10-231-0/+1
| | | | | | | | Some class extending MediaWikiTestCase did not call its setUp method. We most probably always want to do it since MediaWikiTestCase::setUp() does garbage collection and might do more in the future. Change-Id: I68dde370a62c8f4a779836ca0c4ad06844fdc916
* Clean and repair many phpunit tests (+ fix implied configuration)Timo Tijhof2012-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit depends on the introduction of MediaWikiTestCase::setMwGlobals in change Iccf6ea81f4. Various tests already set their globals, but forgot to restore them afterwards, or forgot to call the parent setUp, tearDown... Either way they won't have to anymore with setMwGlobals. Consistent use of function characteristics: * protected function setUp * protected function tearDown * public static function (provide..) (Matching the function signature with PHPUnit/Framework/TestCase.php) Replaces: * public function (setUp|tearDown)\( * protected function $1( * \tfunction (setUp|tearDown)\( * \tprotected function $1( * \tfunction (data|provide)\( * \tpublic static function $1\( Also renamed a few "data#", "provider#" and "provides#" functions to "provide#" for consistency. This also removes confusion where the /media tests had a few private methods called dataFile(), which were sometimes expected to be data providers. Fixes: TimestampTest often failed due to a previous test setting a different language (it tests "1 hour ago" so need to make sure it is set to English). MWNamespaceTest became a lot cleaner now that it executes with a known context. Though the now-redundant code that was removed didn't work anyway because wgContentNamespaces isn't keyed by namespace id, it had them was values... FileBackendTest: * Fixed: "PHP Fatal: Using $this when not in object context" HttpTest * Added comment about: "PHP Fatal: Call to protected MWHttpRequest::__construct()" (too much unrelated code to fix in this commit) ExternalStoreTest * Add an assertTrue as well, without it the test is useless because regardless of whether wgExternalStores is true or false it only uses it if it is an array. Change-Id: I9d2b148e57bada64afeb7d5a99bec0e58f8e1561
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-1/+1
| | | | | | We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :) Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* * (bug 24230) Added JAR detection. ZIP archives containing a .class file ↵Tim Starling2011-02-251-0/+79
will be rejected by default. Malformed ZIP archives will be rejected due to the danger of ambiguous parsing on the client side. * Removed the ZIP subtypes from $wgMimeTypeBlacklist, they no longer need to be there. * Added ZipDirectoryReader. Added some small ZIP files which are used to test its various error cases. Most were constructed with a hex editor. * Fixed getStatusArray() to return a consistent type regardless of whether the error message has parameters. This allows error messages with no parameters to work with the Status object conversion code in UploadBase::verifyFile(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/82783