コード例 #1
0
 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();
 }
コード例 #2
0
ファイル: cache.php プロジェクト: olucao/owncloud-core
 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));
 }
コード例 #3
0
ファイル: manager.php プロジェクト: evanjt/core
 public function getId()
 {
     return 'long:' . str_repeat('foo', 50) . parent::getId();
 }