diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-02 15:20:12 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-14 12:54:42 +0100 |
commit | 62d383e1ba70b85c488bf72c83d2b117476b100b (patch) | |
tree | 511edcd289f9920a4bf54e5ff8136631625861d2 /tests/lib | |
parent | dcbeeced3bad6b31dc9790bc9b9a65c75762e5fe (diff) | |
download | nextcloud-server-62d383e1ba70b85c488bf72c83d2b117476b100b.tar.gz nextcloud-server-62d383e1ba70b85c488bf72c83d2b117476b100b.zip |
fix tests
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/files/cache/cache.php | 2 | ||||
-rw-r--r-- | tests/lib/files/cache/scanner.php | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php index d674ac27fa1..de4ae9cd8e9 100644 --- a/tests/lib/files/cache/cache.php +++ b/tests/lib/files/cache/cache.php @@ -556,7 +556,7 @@ class Cache extends \Test\TestCase { $this->assertEquals($folderWith00F6, $unNormalizedFolderName['name']); // put normalized folder - $this->assertTrue(is_array($this->cache->get('folder/' . $folderWith00F6))); + $this->assertInstanceOf('\OCP\Files\Cache\ICacheEntry', $this->cache->get('folder/' . $folderWith00F6)); $this->assertGreaterThan(0, $this->cache->put('folder/' . $folderWith00F6, $data)); // at this point we should have only one folder named "Schön" diff --git a/tests/lib/files/cache/scanner.php b/tests/lib/files/cache/scanner.php index 8186fe29493..b1eb3f589e8 100644 --- a/tests/lib/files/cache/scanner.php +++ b/tests/lib/files/cache/scanner.php @@ -7,6 +7,7 @@ */ namespace Test\Files\Cache; +use OC\Files\Cache\CacheEntry; /** * Class Scanner @@ -226,6 +227,7 @@ class Scanner extends \Test\TestCase { // manipulate etag to simulate an empty etag $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG); + /** @var CacheEntry $data0 */ $data0 = $this->cache->get('folder/bar.txt'); $this->assertInternalType('string', $data0['etag']); $data1 = $this->cache->get('folder'); @@ -233,7 +235,7 @@ class Scanner extends \Test\TestCase { $data2 = $this->cache->get(''); $this->assertInternalType('string', $data2['etag']); $data0['etag'] = ''; - $this->cache->put('folder/bar.txt', $data0); + $this->cache->put('folder/bar.txt', $data0->getData()); // rescan $this->scanner->scan('folder/bar.txt', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG); |