summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/ZipDirectoryReaderTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /tests/phpunit/includes/ZipDirectoryReaderTest.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'tests/phpunit/includes/ZipDirectoryReaderTest.php')
-rw-r--r--tests/phpunit/includes/ZipDirectoryReaderTest.php27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/phpunit/includes/ZipDirectoryReaderTest.php b/tests/phpunit/includes/ZipDirectoryReaderTest.php
index 3fea57a0..2627a417 100644
--- a/tests/phpunit/includes/ZipDirectoryReaderTest.php
+++ b/tests/phpunit/includes/ZipDirectoryReaderTest.php
@@ -1,7 +1,12 @@
<?php
+/**
+ * @covers ZipDirectoryReader
+ * NOTE: this test is more like an integration test than a unit test
+ */
class ZipDirectoryReaderTest extends MediaWikiTestCase {
- var $zipDir, $entries;
+ protected $zipDir;
+ protected $entries;
protected function setUp() {
parent::setUp();
@@ -24,21 +29,21 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
$this->assertTrue( $status->isOK(), $assertMessage );
}
- function testEmpty() {
+ public function testEmpty() {
$this->readZipAssertSuccess( 'empty.zip', 'Empty zip' );
}
- function testMultiDisk0() {
+ public function testMultiDisk0() {
$this->readZipAssertError( 'split.zip', 'zip-unsupported',
'Split zip error' );
}
- function testNoSignature() {
+ public function testNoSignature() {
$this->readZipAssertError( 'nosig.zip', 'zip-wrong-format',
'No signature should give "wrong format" error' );
}
- function testSimple() {
+ public function testSimple() {
$this->readZipAssertSuccess( 'class.zip', 'Simple ZIP' );
$this->assertEquals( $this->entries, array( array(
'name' => 'Class.class',
@@ -47,33 +52,33 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
) ) );
}
- function testBadCentralEntrySignature() {
+ public function testBadCentralEntrySignature() {
$this->readZipAssertError( 'wrong-central-entry-sig.zip', 'zip-bad',
'Bad central entry error' );
}
- function testTrailingBytes() {
+ public function testTrailingBytes() {
$this->readZipAssertError( 'trail.zip', 'zip-bad',
'Trailing bytes error' );
}
- function testWrongCDStart() {
+ public function testWrongCDStart() {
$this->readZipAssertError( 'wrong-cd-start-disk.zip', 'zip-unsupported',
'Wrong CD start disk error' );
}
- function testCentralDirectoryGap() {
+ public function testCentralDirectoryGap() {
$this->readZipAssertError( 'cd-gap.zip', 'zip-bad',
'CD gap error' );
}
- function testCentralDirectoryTruncated() {
+ public function testCentralDirectoryTruncated() {
$this->readZipAssertError( 'cd-truncated.zip', 'zip-bad',
'CD truncated error (should hit unpack() overrun)' );
}
- function testLooksLikeZip64() {
+ public function testLooksLikeZip64() {
$this->readZipAssertError( 'looks-like-zip64.zip', 'zip-unsupported',
'A file which looks like ZIP64 but isn\'t, should give error' );
}