Merge pull request #12750 from owncloud/cache-numericstorageidfix

Fix numeric storage id for cache wrapper
This commit is contained in:
Robin Appelman 2014-12-10 15:03:41 +01:00
commit 3898fbc0d2
2 changed files with 13 additions and 0 deletions

View file

@ -233,6 +233,15 @@ class CacheWrapper extends Cache {
return $this->cache->getPathById($id);
}
/**
* 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

View file

@ -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';