summaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Stream/EncryptionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Stream/EncryptionTest.php')
-rw-r--r--tests/lib/Files/Stream/EncryptionTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php
index 983428ee51d..d7a5554acfd 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -2,8 +2,10 @@
namespace Test\Files\Stream;
+use OC\Files\Cache\CacheEntry;
use OC\Files\View;
use OC\Memcache\ArrayCache;
+use OCP\Files\Cache\ICache;
use OCP\IConfig;
class EncryptionTest extends \Test\TestCase {
@@ -26,6 +28,7 @@ class EncryptionTest extends \Test\TestCase {
$header = [];
$uid = '';
$this->encryptionModule = $this->buildMockModule();
+ $cache = $this->createMock(ICache::class);
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()->getMock();
$encStorage = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption')
@@ -49,6 +52,13 @@ class EncryptionTest extends \Test\TestCase {
$util->expects($this->any())
->method('getUidAndFilename')
->willReturn(['user1', $internalPath]);
+ $storage->expects($this->any())->method('getCache')->willReturn($cache);
+ $entry = new CacheEntry([
+ 'fileid' => 5,
+ 'encryptedVersion' => 2,
+ ]);
+ $cache->expects($this->any())->method('get')->willReturn($entry );
+ $cache->expects($this->any())->method('update')->with(5, ['encrypted' => 3, 'encryptedVersion' => 3]);
return $wrapper::wrap($source, $internalPath,
@@ -208,6 +218,7 @@ class EncryptionTest extends \Test\TestCase {
public function testSeek() {
$fileName = tempnam("/tmp", "FOO");
+
$stream = $this->getStream($fileName, 'w+', 0);
$this->assertEquals(6, fwrite($stream, 'foobar'));
$this->assertEquals(0, fseek($stream, 3));
light .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php $TRANSLATIONS = array(
"You need to log in." => "Bisogna effettuare il login.",
"This is not your addressbook." => "Questa non è la tua rubrica.",
"Contact could not be found." => "Il contatto non può essere trovato",
"This is not your contact." => "Questo non è un tuo contatto.",
"vCard could not be read." => "La vCard non può essere letta",
"Information about vCard is incorrect. Please reload the page." => "Informazioni sulla vCard incorrette. Ricaricare la pagina.",
"This card is not RFC compatible." => "Questa card non è compatibile con il protocollo RFC.",
"This card does not contain a photo." => "Questa card non contiene una foto.",
"Add Contact" => "Aggiungi contatto",
"Group" => "Gruppo",
"Name" => "Nome",
"Create Contact" => "Crea contatto",
"Address" => "Indirizzo",
"Telephone" => "Telefono",
"Email" => "Email",
"Organization" => "Organizzazione",
"Work" => "Lavoro",
"Home" => "Casa",
"PO Box" => "PO Box",
"Extended" => "Estendi",
"Street" => "Via",
"City" => "Città",
"Region" => "Regione",
"Zipcode" => "CAP",
"Country" => "Stato",
"Mobile" => "Cellulare",
"Text" => "Testo",
"Voice" => "Voce",
"Fax" => "Fax",
"Video" => "Video",
"Pager" => "Pager",
"Delete" => "Cancella",
"Add Property" => "Aggiungi proprietà",
"Birthday" => "Compleanno",
"Phone" => "Telefono",
"Edit" => "Modifica"
);