[Pkg-owncloud-commits] [owncloud] 150/239: Updated unit tests for SMB

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 712b47757af04d6c62fd8da222aa197c23363678
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Tue Nov 26 12:53:03 2013 +0100

    Updated unit tests for SMB
    
    - coverage for touch return value
    - fixed directory provider to exclude unsupported cases
---
 apps/files_external/tests/smb.php   | 5 +++++
 tests/lib/files/storage/storage.php | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index 0291f29..199e35a 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -29,6 +29,11 @@ class SMB extends Storage {
 		}
 	}
 
+	public function directoryProvider() {
+		// doesn't support leading/trailing spaces
+		return array(array('folder'));
+	}
+
 	public function testRenameWithSpaces() {
 		$this->instance->mkdir('with spaces');
 		$result = $this->instance->rename('with spaces', 'foo bar');
diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php
index 6c433e9..5b5b855 100644
--- a/tests/lib/files/storage/storage.php
+++ b/tests/lib/files/storage/storage.php
@@ -236,7 +236,8 @@ abstract class Storage extends \PHPUnit_Framework_TestCase {
 
 	public function testTouchCreateFile() {
 		$this->assertFalse($this->instance->file_exists('foo'));
-		$this->instance->touch('foo');
+		// returns true on success
+		$this->assertTrue($this->instance->touch('foo'));
 		$this->assertTrue($this->instance->file_exists('foo'));
 	}
 

-- 
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