protected function tearDown() { $this->storage->getCache()->clear(); $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; \OC_DB::executeAudited($sql, [$this->storage->getId()]); $this->clearMimeTypes(); parent::tearDown(); }
function testGetById() { $storageId = $this->storage->getId(); $data = array('size' => 1000, 'mtime' => 20, 'mimetype' => 'foo/file'); $id = $this->cache->put('foo', $data); $this->assertEquals(array($storageId, 'foo'), \OC\Files\Cache\Cache::getById($id)); }
public function getId() { return 'long:' . str_repeat('foo', 50) . parent::getId(); }