summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorElan Ruusamäe <glen@delfi.ee>2014-04-14 23:16:49 +0300
committerElan Ruusamäe <glen@delfi.ee>2014-04-14 23:16:49 +0300
commit9efc0669141c20c5c3cf1c76384b8c85734788c9 (patch)
treeee7e7fd947f04e47a025fc38f6b722b42cbe2c76 /_test
parent56ecd4f4244ec276b92fb0d96ae23484463e6484 (diff)
downloadrpg-9efc0669141c20c5c3cf1c76384b8c85734788c9.tar.gz
rpg-9efc0669141c20c5c3cf1c76384b8c85734788c9.tar.bz2
run as much as possible (fill extensions conditionally), skip missing ext once
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/tar.test.php30
1 files changed, 14 insertions, 16 deletions
diff --git a/_test/tests/inc/tar.test.php b/_test/tests/inc/tar.test.php
index 91e71632c..76037d401 100644
--- a/_test/tests/inc/tar.test.php
+++ b/_test/tests/inc/tar.test.php
@@ -4,7 +4,16 @@ class Tar_TestCase extends DokuWikiTest {
/**
* file extensions that several tests use
*/
- protected $extensions = array('tar', 'tgz', 'tbz');
+ protected $extensions = array('tar');
+
+ public function setUp() {
+ if (extension_loaded('zlib')) {
+ $this->extensions[] = 'tgz';
+ }
+ if (extension_loaded('bz2')) {
+ $this->extensions[] = 'tbz';
+ }
+ }
/*
* dependency for tests needing zlib extension to pass
@@ -15,16 +24,12 @@ class Tar_TestCase extends DokuWikiTest {
}
}
- /**
- * dependency test to test available extensions
- * fills $this->extensions array
+ /*
+ * dependency for tests needing zlib extension to pass
*/
- public function test_extensions() {
- if (!extension_loaded('zlib')) {
- $this->markTestSkipped('skipping all zlib tests. Need zlib extension');
- }
+ public function test_ext_bz2() {
if (!extension_loaded('bz2')) {
- $this->markTestSkipped('skipping all bz2 tests. Need bz2 extension');
+ $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension');
}
}
@@ -109,7 +114,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* List the contents of the prebuilt TAR files
- * @depends test_extensions
*/
public function test_tarcontent() {
$dir = dirname(__FILE__).'/tar';
@@ -132,7 +136,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Extract the prebuilt tar files
- * @depends test_extensions
*/
public function test_tarextract() {
$dir = dirname(__FILE__).'/tar';
@@ -159,7 +162,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Extract the prebuilt tar files with component stripping
- * @depends test_extensions
*/
public function test_compstripextract() {
$dir = dirname(__FILE__).'/tar';
@@ -186,7 +188,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Extract the prebuilt tar files with prefix stripping
- * @depends test_extensions
*/
public function test_prefixstripextract() {
$dir = dirname(__FILE__).'/tar';
@@ -213,7 +214,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Extract the prebuilt tar files with include regex
- * @depends test_extensions
*/
public function test_includeextract() {
$dir = dirname(__FILE__).'/tar';
@@ -239,7 +239,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Extract the prebuilt tar files with exclude regex
- * @depends test_extensions
*/
public function test_excludeextract() {
$dir = dirname(__FILE__).'/tar';
@@ -265,7 +264,6 @@ class Tar_TestCase extends DokuWikiTest {
/**
* Check the extension to compression guesser
- * @depends test_extensions
*/
public function test_filetype() {
$tar = new Tar();