summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/files/cache/wrapper/cachewrapper.php9
-rw-r--r--tests/lib/files/cache/cache.php4
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/files/cache/wrapper/cachewrapper.php b/lib/private/files/cache/wrapper/cachewrapper.php
index 040358ec657..d3d64e3f0a9 100644
--- a/lib/private/files/cache/wrapper/cachewrapper.php
+++ b/lib/private/files/cache/wrapper/cachewrapper.php
@@ -234,6 +234,15 @@ class CacheWrapper extends Cache {
}
/**
+ * Returns the numeric storage id
+ *
+ * @return int
+ */
+ public function getNumericStorageId() {
+ return $this->cache->getNumericStorageId();
+ }
+
+ /**
* get the storage id of the storage for a file and the internal path of the file
* unlike getPathById this does not limit the search to files on this storage and
* instead does a global search in the cache table
diff --git a/tests/lib/files/cache/cache.php b/tests/lib/files/cache/cache.php
index 7360e9885c1..7e44cb898ac 100644
--- a/tests/lib/files/cache/cache.php
+++ b/tests/lib/files/cache/cache.php
@@ -35,6 +35,10 @@ class Cache extends \Test\TestCase {
*/
protected $cache2;
+ public function testGetNumericId() {
+ $this->assertNotNull($this->cache->getNumericStorageId());
+ }
+
public function testSimple() {
$file1 = 'foo';
$file2 = 'foo/bar';