diff options
Diffstat (limited to 'apps/files_encryption/tests/stream.php')
-rw-r--r-- | apps/files_encryption/tests/stream.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 2caebf912ed..67b5e98ae67 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -10,23 +10,23 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); function testStream() { - $stream=$this->getStream('test1','w', strlen('foobar')); - fwrite($stream,'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); $file=OC::$SERVERROOT.'/3rdparty/MDB2.php'; - $source=fopen($file,'r'); + $source=fopen($file, 'r'); $target=$this->getStream('test2', 'w', 0); OCP\Files::streamCopy($source, $target); 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)); @@ -51,7 +51,7 @@ class Test_CryptStream extends UnitTestCase { $file=$this->tmpFiles[$id]; } $stream=fopen($file, $mode); - OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id,'stream'=>$stream,'size'=>$size); + OC_CryptStream::$sourceStreams[$id]=array('path'=>'dummy'.$id, 'stream'=>$stream, 'size'=>$size); return fopen('crypt://streams/'.$id, $mode); } @@ -59,11 +59,11 @@ 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)); @@ -72,11 +72,11 @@ class Test_CryptStream extends UnitTestCase { $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)); |