diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-10-01 13:12:41 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-10-08 18:49:52 +0200 |
commit | 27bb968ffae4aeecd3116eab7fb1c3fa56cbfa88 (patch) | |
tree | 20266e8af4a67fb96b11ce5f15b1ae45b8d0402c | |
parent | aa3ad898a93388dcdea097601c18cc2759283742 (diff) | |
download | nextcloud-server-27bb968ffae4aeecd3116eab7fb1c3fa56cbfa88.tar.gz nextcloud-server-27bb968ffae4aeecd3116eab7fb1c3fa56cbfa88.zip |
make some storage tests explain what went wrong
-rw-r--r-- | tests/lib/files/storage/storage.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index 88fbdd4fcf2..cf42523a5e2 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -457,12 +457,12 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { $this->instance->file_put_contents('target/test1.txt', 'bar'); $this->instance->file_put_contents('target/test2.txt', 'bar'); - $this->instance->rename('source', 'target'); + $this->assertTrue($this->instance->rename('source', 'target'), 'rename must return true on success'); - $this->assertFalse($this->instance->file_exists('source')); - $this->assertFalse($this->instance->file_exists('source/test1.txt')); - $this->assertFalse($this->instance->file_exists('target/test2.txt')); - $this->assertEquals('foo', $this->instance->file_get_contents('target/test1.txt')); + $this->assertFalse($this->instance->file_exists('source'), 'source has not been removed'); + $this->assertFalse($this->instance->file_exists('source/test1.txt'), 'source/test1.txt has not been removed'); + $this->assertFalse($this->instance->file_exists('target/test2.txt'), 'target/test2.txt has not been removed'); + $this->assertEquals('foo', $this->instance->file_get_contents('target/test1.txt'), 'target/test1.txt has not been overwritten'); } public function testRenameOverWriteDirectoryOverFile() { @@ -471,7 +471,7 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { $this->instance->file_put_contents('target', 'bar'); - $this->instance->rename('source', 'target'); + $this->assertTrue($this->instance->rename('source', 'target'), 'rename must return true on success'); $this->assertFalse($this->instance->file_exists('source')); $this->assertFalse($this->instance->file_exists('source/test1.txt')); |