summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2013-07-03 18:34:33 +0200
committerChristian Berendt <berendt@b1-systems.de>2013-07-03 18:34:33 +0200
commit407753f59402c7377db1d1badbf198616a1ac563 (patch)
tree234d82de0920c821049f1fe47e0f593607fba37b /tests
parent839ab7f2e6d4b70a30a5d6ef4f121d9e5cc8f802 (diff)
downloadnextcloud-server-407753f59402c7377db1d1badbf198616a1ac563.tar.gz
nextcloud-server-407753f59402c7377db1d1badbf198616a1ac563.zip
move new tests into the correct test method
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/storage/storage.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 8f6a8771ba8..771fad8c61b 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -154,6 +154,16 @@ 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,16 +197,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'));
-
- // 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'));
}
public function testLocal() {