From d9a36ee82ec3bffb83515248b69c287f5fd0170f Mon Sep 17 00:00:00 2001
From: Andreas Fischer <bantu@owncloud.com>
Date: Mon, 23 Sep 2013 12:45:02 +0200
Subject: [PATCH] Move setUp() and tearDown() up in
 tests/lib/files/cache/scanner.php.

---
 tests/lib/files/cache/scanner.php | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php
index 6956e7aa94..3f3a045377 100644
--- a/tests/lib/files/cache/scanner.php
+++ b/tests/lib/files/cache/scanner.php
@@ -24,6 +24,21 @@ class Scanner extends \PHPUnit_Framework_TestCase {
 	 */
 	private $cache;
 
+	function setUp() {
+		$this->storage = new \OC\Files\Storage\Temporary(array());
+		$this->scanner = new \OC\Files\Cache\Scanner($this->storage);
+		$this->cache = new \OC\Files\Cache\Cache($this->storage);
+	}
+
+	function tearDown() {
+		if ($this->cache) {
+			$ids = $this->cache->getAll();
+			$permissionsCache = $this->storage->getPermissionsCache();
+			$permissionsCache->removeMultiple($ids, \OC_User::getUser());
+			$this->cache->clear();
+		}
+	}
+
 	function testFile() {
 		$data = "dummy file data\n";
 		$this->storage->file_put_contents('foo.txt', $data);
@@ -218,19 +233,4 @@ class Scanner extends \PHPUnit_Framework_TestCase {
 		$this->assertNotEquals($data1['etag'], $newData1['etag']);
 		$this->assertNotEquals($data2['etag'], $newData2['etag']);
 	}
-
-	function setUp() {
-		$this->storage = new \OC\Files\Storage\Temporary(array());
-		$this->scanner = new \OC\Files\Cache\Scanner($this->storage);
-		$this->cache = new \OC\Files\Cache\Cache($this->storage);
-	}
-
-	function tearDown() {
-		if ($this->cache) {
-			$ids = $this->cache->getAll();
-			$permissionsCache = $this->storage->getPermissionsCache();
-			$permissionsCache->removeMultiple($ids, \OC_User::getUser());
-			$this->cache->clear();
-		}
-	}
 }
-- 
GitLab