diff options
Diffstat (limited to 'apps/files_encryption/tests')
-rw-r--r-- | apps/files_encryption/tests/encryption.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/tests/proxy.php | 8 | ||||
-rw-r--r-- | apps/files_encryption/tests/stream.php | 20 |
3 files changed, 16 insertions, 16 deletions
diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index 89397f6ef2c..a7bc2df0e12 100644 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -19,7 +19,7 @@ class Test_Encryption extends UnitTestCase { $chunk=substr($source,0,8192); $encrypted=OC_Crypt::encrypt($chunk,$key); - $this->assertEqual(strlen($chunk),strlen($encrypted)); + $this->assertEqual(strlen($chunk), strlen($encrypted)); $decrypted=OC_Crypt::decrypt($encrypted,$key); $decrypted=rtrim($decrypted, "\0"); $this->assertEqual($decrypted,$chunk); @@ -66,7 +66,7 @@ class Test_Encryption extends UnitTestCase { $this->assertEqual($decrypted,$source); $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key,strlen($source)); + $decrypted=OC_Crypt::blockDecrypt($encrypted,$key, strlen($source)); $this->assertEqual($decrypted,$source); } } diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php index 042011a6c87..c3c8f4a2db0 100644 --- a/apps/files_encryption/tests/proxy.php +++ b/apps/files_encryption/tests/proxy.php @@ -30,7 +30,7 @@ class Test_CryptProxy extends UnitTestCase { //set up temporary storage OC_Filesystem::clearMounts(); - OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/'); + OC_Filesystem::mount('OC_Filestorage_Temporary', array(),'/'); OC_Filesystem::init('/'.$user.'/files'); @@ -59,7 +59,7 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); $this->assertEqual($original,$fromFile); } @@ -98,7 +98,7 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); $this->assertEqual($original,$fromFile); $file=__DIR__.'/zeros'; @@ -112,6 +112,6 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); } } diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 39b13620782..5ea0da48017 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -10,11 +10,11 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); function testStream() { - $stream=$this->getStream('test1','w',strlen('foobar')); + $stream=$this->getStream('test1','w', strlen('foobar')); fwrite($stream,'foobar'); fclose($stream); - $stream=$this->getStream('test1','r',strlen('foobar')); + $stream=$this->getStream('test1','r', strlen('foobar')); $data=fread($stream,6); fclose($stream); $this->assertEqual('foobar',$data); @@ -26,10 +26,10 @@ class Test_CryptStream extends UnitTestCase { fclose($target); fclose($source); - $stream=$this->getStream('test2','r',filesize($file)); + $stream=$this->getStream('test2','r', filesize($file)); $data=stream_get_contents($stream); $original=file_get_contents($file); - $this->assertEqual(strlen($original),strlen($data)); + $this->assertEqual(strlen($original), strlen($data)); $this->assertEqual($original,$data); } @@ -59,27 +59,27 @@ class Test_CryptStream extends UnitTestCase { $file=__DIR__.'/binary'; $source=file_get_contents($file); - $stream=$this->getStream('test','w',strlen($source)); + $stream=$this->getStream('test','w', strlen($source)); fwrite($stream,$source); fclose($stream); - $stream=$this->getStream('test','r',strlen($source)); + $stream=$this->getStream('test','r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); - $this->assertEqual(strlen($data),strlen($source)); + $this->assertEqual(strlen($data), strlen($source)); $this->assertEqual($source,$data); $file=__DIR__.'/zeros'; $source=file_get_contents($file); - $stream=$this->getStream('test2','w',strlen($source)); + $stream=$this->getStream('test2','w', strlen($source)); fwrite($stream,$source); fclose($stream); - $stream=$this->getStream('test2','r',strlen($source)); + $stream=$this->getStream('test2','r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); - $this->assertEqual(strlen($data),strlen($source)); + $this->assertEqual(strlen($data), strlen($source)); $this->assertEqual($source,$data); } } |