Skip to content
Snippets Groups Projects
Commit 0a5e1833 authored by Christian Berendt's avatar Christian Berendt
Browse files

test working with files in subdirectories

parent e556b7ab
Branches
No related tags found
No related merge requests found
......@@ -127,6 +127,16 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
$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'));
// 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'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment