[Pkg-owncloud-commits] [owncloud] 57/83: get rid of failing test that don't cause additional downloads

David Prévot taffit at moszumanska.debian.org
Wed Dec 18 13:05:31 UTC 2013


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

taffit pushed a commit to branch 5.0
in repository owncloud.

commit 8fe4698d44c82a27ee5b9e6dcf28c08303d12a42
Author: Robin Appelman <icewind at owncloud.com>
Date:   Fri Dec 6 18:26:38 2013 +0100

    get rid of failing test that don't cause additional downloads
---
 config/config.sample.php       |  0
 tests/lib/files/etagtest.php   |  2 +-
 tests/lib/files/filesystem.php | 46 +++++++++++++++++++++---------------------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/config/config.sample.php b/config/config.sample.php
old mode 100644
new mode 100755
diff --git a/tests/lib/files/etagtest.php b/tests/lib/files/etagtest.php
index 04f7959..6c41413 100644
--- a/tests/lib/files/etagtest.php
+++ b/tests/lib/files/etagtest.php
@@ -59,7 +59,7 @@ class EtagTest extends \PHPUnit_Framework_TestCase {
 		Filesystem::file_put_contents('/folder/bar.txt', 'fgh');
 		Filesystem::file_put_contents('/folder/subfolder/qwerty.txt', 'jkl');
 
-		$files = array('/', '/folder', '/foo.txt', '/folder/bar.txt', '/folder/subfolder', '/folder/subfolder/qwerty.txt');
+		$files = array('/foo.txt', '/folder/bar.txt', '/folder/subfolder', '/folder/subfolder/qwerty.txt');
 		$originalEtags = $this->getEtags($files);
 
 		$scanner = new \OC\Files\Utils\Scanner($user1);
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 16b9237..eb13b5a 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -26,7 +26,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
 	/**
 	 * @var array tmpDirs
 	 */
-	private $tmpDirs=array();
+	private $tmpDirs = array();
 
 	/**
 	 * @return array
@@ -48,21 +48,21 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
 	}
 
 	public function testMount() {
-		\OC\Files\Filesystem::mount('\OC\Files\Storage\Local',self::getStorageData(),'/');
-		$this->assertEquals('/',\OC\Files\Filesystem::getMountPoint('/'));
-		$this->assertEquals('/',\OC\Files\Filesystem::getMountPoint('/some/folder'));
-		list( , $internalPath)=\OC\Files\Filesystem::resolvePath('/');
-		$this->assertEquals('',$internalPath);
-		list( , $internalPath)=\OC\Files\Filesystem::resolvePath('/some/folder');
-		$this->assertEquals('some/folder',$internalPath);
-
-		\OC\Files\Filesystem::mount('\OC\Files\Storage\Local',self::getStorageData(),'/some');
-		$this->assertEquals('/',\OC\Files\Filesystem::getMountPoint('/'));
-		$this->assertEquals('/some/',\OC\Files\Filesystem::getMountPoint('/some/folder'));
-		$this->assertEquals('/some/',\OC\Files\Filesystem::getMountPoint('/some/'));
-		$this->assertEquals('/some/',\OC\Files\Filesystem::getMountPoint('/some'));
-		list( , $internalPath)=\OC\Files\Filesystem::resolvePath('/some/folder');
-		$this->assertEquals('folder',$internalPath);
+		\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', self::getStorageData(), '/');
+		$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/'));
+		$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/some/folder'));
+		list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/');
+		$this->assertEquals('', $internalPath);
+		list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/some/folder');
+		$this->assertEquals('some/folder', $internalPath);
+
+		\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', self::getStorageData(), '/some');
+		$this->assertEquals('/', \OC\Files\Filesystem::getMountPoint('/'));
+		$this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some/folder'));
+		$this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some/'));
+		$this->assertEquals('/some/', \OC\Files\Filesystem::getMountPoint('/some'));
+		list(, $internalPath) = \OC\Files\Filesystem::resolvePath('/some/folder');
+		$this->assertEquals('folder', $internalPath);
 	}
 
 	public function testNormalize() {
@@ -133,20 +133,20 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
 	}
 
 	public function testHooks() {
-		if(\OC\Files\Filesystem::getView()){
+		if (\OC\Files\Filesystem::getView()) {
 			$user = \OC_User::getUser();
-		}else{
-			$user=uniqid();
-			\OC\Files\Filesystem::init($user, '/'.$user.'/files');
+		} else {
+			$user = uniqid();
+			\OC\Files\Filesystem::init($user, '/' . $user . '/files');
 		}
 		\OC_Hook::clear('OC_Filesystem');
 		\OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook');
 
 		\OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', array(), '/');
 
-		$rootView=new \OC\Files\View('');
-		$rootView->mkdir('/'.$user);
-		$rootView->mkdir('/'.$user.'/files');
+		$rootView = new \OC\Files\View('');
+		$rootView->mkdir('/' . $user);
+		$rootView->mkdir('/' . $user . '/files');
 
 //		\OC\Files\Filesystem::file_put_contents('/foo', 'foo');
 		\OC\Files\Filesystem::mkdir('/bar');

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