[Pkg-owncloud-commits] [owncloud] 193/258: make some storage tests explain what went wrong
David Prévot
taffit at moszumanska.debian.org
Sat Oct 11 17:22:35 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit c8dab5829c3e09a43975d2c5f9dca02c68076313
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date: Wed Oct 1 13:12:41 2014 +0200
make some storage tests explain what went wrong
---
tests/lib/files/storage/storage.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 88fbdd4..cf42523 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'));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list