summaryrefslogtreecommitdiff
path: root/_test
diff options
context:
space:
mode:
authorPatrick Brown <ptbrown@whoopdedo.org>2015-05-08 17:13:32 -0400
committerPatrick Brown <ptbrown@whoopdedo.org>2015-05-08 17:13:32 -0400
commit0c26fb18171bc6264c1b0b2dbdfddc34de5d579e (patch)
treee8b0f5a5d085f8b8a14579ccadfc4eac5f8f0f50 /_test
parent6c0002048504e43b399abece0668afa2b5c87a07 (diff)
downloadrpg-0c26fb18171bc6264c1b0b2dbdfddc34de5d579e.tar.gz
rpg-0c26fb18171bc6264c1b0b2dbdfddc34de5d579e.tar.bz2
Don't run redundant tests
io_deleteFromFile is a special case of io_replaceInFile. Since the io_replace tests check compressed files, it doesn't have to be done in the io_delete test.
Diffstat (limited to '_test')
-rw-r--r--_test/tests/inc/io_deletefromfile.test.php39
1 files changed, 2 insertions, 37 deletions
diff --git a/_test/tests/inc/io_deletefromfile.test.php b/_test/tests/inc/io_deletefromfile.test.php
index 63951f548..e86150aac 100644
--- a/_test/tests/inc/io_deletefromfile.test.php
+++ b/_test/tests/inc/io_deletefromfile.test.php
@@ -2,25 +2,8 @@
class io_deletefromfile_test extends DokuWikiTest {
- /*
- * dependency for tests needing zlib extension to pass
- */
- public function test_ext_zlib() {
- if (!extension_loaded('zlib')) {
- $this->markTestSkipped('skipping all zlib tests. Need zlib extension');
- }
- }
-
- /*
- * dependency for tests needing zlib extension to pass
- */
- public function test_ext_bz2() {
- if (!extension_loaded('bz2')) {
- $this->markTestSkipped('skipping all bzip2 tests. Need bz2 extension');
- }
- }
-
- function _write($file){
+ function test_delete(){
+ $file = TMP_DIR.'/test.txt';
$contents = "The\012Delete\012Delete01\012Delete02\012Delete\012DeleteX\012Test\012";
io_saveFile($file, $contents);
$this->assertTrue(io_deleteFromFile($file, "Delete\012"));
@@ -29,22 +12,4 @@ class io_deletefromfile_test extends DokuWikiTest {
$this->assertEquals("The\012DeleteX\012Test\012", io_readFile($file));
}
- function test_delete(){
- $this->_write(TMP_DIR.'/test.txt');
- }
-
- /**
- * @depends test_ext_zlib
- */
- function test_gzwrite(){
- $this->_write(TMP_DIR.'/test.txt.gz');
- }
-
- /**
- * @depends test_ext_bz2
- */
- function test_bzwrite(){
- $this->_write(TMP_DIR.'/test.txt.bz2');
- }
-
}