diff --git a/tests/lib/files/cache/updater.php b/tests/lib/files/cache/updater.php
index 8059418dc16e6a5a2f08b685bbe0d0afed306065..b2eccf9130a818a6869ea1000eb9e0e57a21b552 100644
--- a/tests/lib/files/cache/updater.php
+++ b/tests/lib/files/cache/updater.php
@@ -61,7 +61,9 @@ class Updater extends \PHPUnit_Framework_TestCase {
 	}
 
 	public function tearDown() {
-		$this->cache->clear();
+		if($this->cache){
+			$this->cache->clear();
+		}
 		Filesystem::tearDown();
 	}