revoking additional tests
This commit is contained in:
parent
b3d6517c62
commit
92e7392852
1 changed files with 0 additions and 99 deletions
|
@ -79,54 +79,6 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
|
|||
}
|
||||
}
|
||||
$this->assertEquals(array(), $content);
|
||||
|
||||
$this->assertTrue($this->instance->mkdir('/folder'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_a'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_b'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_b/sub_bb'));
|
||||
$this->assertTrue($this->instance->touch('/folder/sub_b/sub_bb/file.txt'));
|
||||
$this->assertTrue($this->instance->touch('/folder/sub_a/file.txt'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_b/sub_bb'));
|
||||
$this->assertTrue($this->instance->file_exists('/folder/sub_a/file.txt'));
|
||||
$this->assertTrue($this->instance->file_exists('/folder/sub_b/sub_bb/file.txt'));
|
||||
|
||||
$dh = $this->instance->opendir('/folder');
|
||||
$content = array();
|
||||
while ($file = readdir($dh)) {
|
||||
if ($file != '.' and $file != '..') {
|
||||
$content[] = $file;
|
||||
}
|
||||
}
|
||||
$this->assertEquals(array('sub_a', 'sub_b'), $content);
|
||||
|
||||
$dh = $this->instance->opendir('/folder/sub_b/sub_bb');
|
||||
$content = array();
|
||||
while ($file = readdir($dh)) {
|
||||
if ($file != '.' and $file != '..') {
|
||||
$content[] = $file;
|
||||
}
|
||||
}
|
||||
$this->assertEquals(array('file.txt'), $content);
|
||||
|
||||
$this->assertTrue($this->instance->rmdir('/folder/sub_b'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b/sub_bb'));
|
||||
$this->assertFalse($this->instance->file_exists('/folder/sub_b/sub_bb/file.txt'));
|
||||
|
||||
$dh = $this->instance->opendir('/folder');
|
||||
$content = array();
|
||||
while ($file = readdir($dh)) {
|
||||
if ($file != '.' and $file != '..') {
|
||||
$content[] = $file;
|
||||
}
|
||||
}
|
||||
$this->assertEquals(array('sub_a'), $content);
|
||||
|
||||
$this->assertTrue($this->instance->rmdir('/folder'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_a'));
|
||||
$this->assertFalse($this->instance->file_exists('/folder/sub_a/file.txt'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -144,16 +96,6 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
|
|||
//empty the file
|
||||
$this->instance->file_put_contents('/lorem.txt', '');
|
||||
$this->assertEquals('', $this->instance->file_get_contents('/lorem.txt'), 'file not emptied');
|
||||
|
||||
// check if it's working inside directories as well
|
||||
$this->instance->mkdir('/folder');
|
||||
$this->instance->file_put_contents('/folder/lorem.txt', $sourceText);
|
||||
$this->assertFalse($this->instance->is_dir('/folder/lorem.txt'));
|
||||
$this->assertEquals($sourceText, $this->instance->file_get_contents('/folder/lorem.txt'), 'data returned from file_get_contents is not equal to the source data');
|
||||
$this->instance->file_put_contents('/folder/lorem.txt', '');
|
||||
$this->assertEquals('', $this->instance->file_get_contents('/folder/lorem.txt'), 'file not emptied');
|
||||
$this->instance->rmdir('/folder');
|
||||
$this->assertFalse($this->instance->file_exists('/folder/lorem.txt'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -187,47 +129,6 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
|
|||
$this->assertTrue($this->instance->file_exists('/target2.txt'));
|
||||
$this->assertFalse($this->instance->file_exists('/source.txt'));
|
||||
$this->assertEquals(file_get_contents($textFile), $this->instance->file_get_contents('/target.txt'));
|
||||
|
||||
$this->assertTrue($this->instance->mkdir('/folder'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_a'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_b'));
|
||||
$this->assertTrue($this->instance->mkdir('/folder/sub_b/sub_bb'));
|
||||
|
||||
$this->assertTrue($this->instance->rename('/folder/sub_b', '/folder/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c/sub_bb'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b/sub_bb'));
|
||||
|
||||
$this->assertTrue($this->instance->rename('/folder', '/folder_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b/sub_c/sub_bb'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_c'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_c/sub_bb'));
|
||||
|
||||
$this->assertTrue($this->instance->copy('/folder_b', '/folder'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder_b/sub_c/sub_bb'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c/sub_bb'));
|
||||
|
||||
$this->assertTrue($this->instance->copy('/folder/sub_c', '/folder/sub_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_b'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_b/sub_bb'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c'));
|
||||
$this->assertTrue($this->instance->is_dir('/folder/sub_c/sub_bb'));
|
||||
|
||||
$this->assertTrue($this->instance->rmdir('/folder'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_a'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_c'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_b/sub_bb'));
|
||||
$this->assertFalse($this->instance->is_dir('/folder/sub_c/sub_bb'));
|
||||
}
|
||||
|
||||
public function testLocal() {
|
||||
|
|
Loading…
Reference in a new issue