summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-09-07 15:22:01 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2012-09-07 15:22:01 +0200
commit3829460ab8cbb6de65c53583a20fd04cbe7927dd (patch)
tree4dc24845a5eb31b17510a621e14c15b51f16bf7b /tests/lib
parent785aa751bb5f9a4bcdd677b96207550482e17d3c (diff)
downloadnextcloud-server-3829460ab8cbb6de65c53583a20fd04cbe7927dd.tar.gz
nextcloud-server-3829460ab8cbb6de65c53583a20fd04cbe7927dd.zip
adding space between) and {
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/archive.php24
-rw-r--r--tests/lib/archive/tar.php6
-rw-r--r--tests/lib/archive/zip.php6
-rw-r--r--tests/lib/cache.php8
-rw-r--r--tests/lib/cache/apc.php4
-rw-r--r--tests/lib/cache/file.php6
-rw-r--r--tests/lib/cache/xcache.php4
-rw-r--r--tests/lib/filestorage.php28
-rw-r--r--tests/lib/filestorage/commontest.php6
-rw-r--r--tests/lib/filestorage/local.php4
-rw-r--r--tests/lib/filesystem.php14
-rw-r--r--tests/lib/group.php6
-rw-r--r--tests/lib/group/backend.php8
-rw-r--r--tests/lib/group/database.php10
-rw-r--r--tests/lib/group/dummy.php2
-rw-r--r--tests/lib/streamwrappers.php12
-rw-r--r--tests/lib/user/backend.php6
-rw-r--r--tests/lib/user/database.php8
-rw-r--r--tests/lib/user/dummy.php2
19 files changed, 82 insertions, 82 deletions
diff --git a/tests/lib/archive.php b/tests/lib/archive.php
index 1711be58e01..565c314cb8c 100644
--- a/tests/lib/archive.php
+++ b/tests/lib/archive.php
@@ -23,12 +23,12 @@ abstract class Test_Archive extends UnitTestCase {
*/
abstract protected function getNew();
- public function testGetFiles(){
+ public function testGetFiles() {
$this->instance=$this->getExisting();
$allFiles=$this->instance->getFiles();
$expected=array('lorem.txt','logo-wide.png','dir/','dir/lorem.txt');
$this->assertEqual(4,count($allFiles),'only found '.count($allFiles).' out of 4 expected files');
- foreach($expected as $file){
+ foreach($expected as $file) {
$this->assertNotIdentical(false,array_search($file,$allFiles),'cant find '.$file.' in archive');
$this->assertTrue($this->instance->fileExists($file),'file '.$file.' does not exist in archive');
}
@@ -37,19 +37,19 @@ abstract class Test_Archive extends UnitTestCase {
$rootContent=$this->instance->getFolder('');
$expected=array('lorem.txt','logo-wide.png','dir/');
$this->assertEqual(3,count($rootContent));
- foreach($expected as $file){
+ foreach($expected as $file) {
$this->assertNotIdentical(false,array_search($file,$rootContent),'cant find '.$file.' in archive');
}
$dirContent=$this->instance->getFolder('dir/');
$expected=array('lorem.txt');
$this->assertEqual(1,count($dirContent));
- foreach($expected as $file){
+ foreach($expected as $file) {
$this->assertNotIdentical(false,array_search($file,$dirContent),'cant find '.$file.' in archive');
}
}
- public function testContent(){
+ public function testContent() {
$this->instance=$this->getExisting();
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$textFile=$dir.'/lorem.txt';
@@ -60,7 +60,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->assertEqual(file_get_contents($textFile),file_get_contents($tmpFile));
}
- public function testWrite(){
+ public function testWrite() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$textFile=$dir.'/lorem.txt';
$this->instance=$this->getNew();
@@ -75,7 +75,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->assertEqual('foobar',$this->instance->getFile('lorem.txt'));
}
- public function testReadStream(){
+ public function testReadStream() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$this->instance=$this->getExisting();
$fh=$this->instance->getStream('lorem.txt','r');
@@ -84,7 +84,7 @@ abstract class Test_Archive extends UnitTestCase {
fclose($fh);
$this->assertEqual(file_get_contents($dir.'/lorem.txt'),$content);
}
- public function testWriteStream(){
+ public function testWriteStream() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$this->instance=$this->getNew();
$fh=$this->instance->getStream('lorem.txt','w');
@@ -95,7 +95,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->assertTrue($this->instance->fileExists('lorem.txt'));
$this->assertEqual(file_get_contents($dir.'/lorem.txt'),$this->instance->getFile('lorem.txt'));
}
- public function testFolder(){
+ public function testFolder() {
$this->instance=$this->getNew();
$this->assertFalse($this->instance->fileExists('/test'));
$this->assertFalse($this->instance->fileExists('/test/'));
@@ -106,7 +106,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->assertFalse($this->instance->fileExists('/test'));
$this->assertFalse($this->instance->fileExists('/test/'));
}
- public function testExtract(){
+ public function testExtract() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$this->instance=$this->getExisting();
$tmpDir=OCP\Files::tmpFolder();
@@ -117,7 +117,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->assertEqual(file_get_contents($dir.'/lorem.txt'),file_get_contents($tmpDir.'lorem.txt'));
OCP\Files::rmdirr($tmpDir);
}
- public function testMoveRemove(){
+ public function testMoveRemove() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$textFile=$dir.'/lorem.txt';
$this->instance=$this->getNew();
@@ -130,7 +130,7 @@ abstract class Test_Archive extends UnitTestCase {
$this->instance->remove('target.txt');
$this->assertFalse($this->instance->fileExists('target.txt'));
}
- public function testRecursive(){
+ public function testRecursive() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
$this->instance=$this->getNew();
$this->instance->addRecursive('/dir',$dir);
diff --git a/tests/lib/archive/tar.php b/tests/lib/archive/tar.php
index 22481f1a54a..2595b7cb195 100644
--- a/tests/lib/archive/tar.php
+++ b/tests/lib/archive/tar.php
@@ -8,14 +8,14 @@
require_once 'archive.php';
-if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){
+if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')) {
class Test_Archive_TAR extends Test_Archive{
- protected function getExisting(){
+ protected function getExisting() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
return new OC_Archive_TAR($dir.'/data.tar.gz');
}
- protected function getNew(){
+ protected function getNew() {
return new OC_Archive_TAR(OCP\Files::tmpFile('.tar.gz'));
}
}
diff --git a/tests/lib/archive/zip.php b/tests/lib/archive/zip.php
index b61d8aeac2c..a7682e34180 100644
--- a/tests/lib/archive/zip.php
+++ b/tests/lib/archive/zip.php
@@ -8,14 +8,14 @@
require_once 'archive.php';
-if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')){
+if(is_dir(OC::$SERVERROOT.'/apps/files_archive/tests/data')) {
class Test_Archive_ZIP extends Test_Archive{
- protected function getExisting(){
+ protected function getExisting() {
$dir=OC::$SERVERROOT.'/apps/files_archive/tests/data';
return new OC_Archive_ZIP($dir.'/data.zip');
}
- protected function getNew(){
+ protected function getNew() {
return new OC_Archive_ZIP(OCP\Files::tmpFile('.zip'));
}
}
diff --git a/tests/lib/cache.php b/tests/lib/cache.php
index 511999be956..9ada0accc21 100644
--- a/tests/lib/cache.php
+++ b/tests/lib/cache.php
@@ -12,11 +12,11 @@ abstract class Test_Cache extends UnitTestCase {
*/
protected $instance;
- public function tearDown(){
+ public function tearDown() {
$this->instance->clear();
}
- function testSimple(){
+ function testSimple() {
$this->assertNull($this->instance->get('value1'));
$this->assertFalse($this->instance->hasKey('value1'));
@@ -45,7 +45,7 @@ abstract class Test_Cache extends UnitTestCase {
$this->assertFalse($this->instance->hasKey('value1'));
}
- function testClear(){
+ function testClear() {
$value='ipsum lorum';
$this->instance->set('1_value1',$value);
$this->instance->set('1_value2',$value);
@@ -65,7 +65,7 @@ abstract class Test_Cache extends UnitTestCase {
$this->assertFalse($this->instance->hasKey('3_value1'));
}
- function testTTL(){
+ function testTTL() {
$value='foobar';
$this->instance->set('value1',$value,1);
$value2='foobar';
diff --git a/tests/lib/cache/apc.php b/tests/lib/cache/apc.php
index ab8eb188664..34ea968cd54 100644
--- a/tests/lib/cache/apc.php
+++ b/tests/lib/cache/apc.php
@@ -25,11 +25,11 @@ class Test_Cache_APC extends Test_Cache {
$this->skipUnless(function_exists('apc_store'));
}
- public function setUp(){
+ public function setUp() {
$this->instance=new OC_Cache_APC();
}
- function testTTL(){
+ function testTTL() {
// ttl doesn't work correctly in the same request
// see https://bugs.php.net/bug.php?id=58084
}
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php
index 28778efb68c..00be005d08d 100644
--- a/tests/lib/cache/file.php
+++ b/tests/lib/cache/file.php
@@ -27,13 +27,13 @@ class Test_Cache_File extends Test_Cache {
//$this->skipUnless(OC_User::isLoggedIn());
}
- public function setUp(){
+ public function setUp() {
//clear all proxies and hooks so we can do clean testing
OC_FileProxy::clearProxies();
OC_Hook::clear('OC_Filesystem');
//enable only the encryption hook if needed
- if(OC_App::isEnabled('files_encryption')){
+ if(OC_App::isEnabled('files_encryption')) {
OC_FileProxy::register(new OC_FileProxy_Encryption());
}
@@ -57,7 +57,7 @@ class Test_Cache_File extends Test_Cache {
$this->instance=new OC_Cache_File();
}
- public function tearDown(){
+ public function tearDown() {
OC_User::setUserId($this->user);
}
}
diff --git a/tests/lib/cache/xcache.php b/tests/lib/cache/xcache.php
index cc2077076ce..85cc2d8b3c6 100644
--- a/tests/lib/cache/xcache.php
+++ b/tests/lib/cache/xcache.php
@@ -25,11 +25,11 @@ class Test_Cache_XCache extends Test_Cache {
$this->skipUnless(function_exists('xcache_get'));
}
- public function setUp(){
+ public function setUp() {
$this->instance=new OC_Cache_XCache();
}
- function testTTL(){
+ function testTTL() {
// ttl doesn't work correctly in the same request
}
}
diff --git a/tests/lib/filestorage.php b/tests/lib/filestorage.php
index 0a8715600d5..3f7bb7b62dc 100644
--- a/tests/lib/filestorage.php
+++ b/tests/lib/filestorage.php
@@ -29,7 +29,7 @@ abstract class Test_FileStorage extends UnitTestCase {
/**
* the root folder of the storage should always exist, be readable and be recognized as a directory
*/
- public function testRoot(){
+ public function testRoot() {
$this->assertTrue($this->instance->file_exists('/'),'Root folder does not exist');
$this->assertTrue($this->instance->isReadable('/'),'Root folder is not readable');
$this->assertTrue($this->instance->is_dir('/'),'Root folder is not a directory');
@@ -40,7 +40,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertTrue($this->instance->isUpdatable('/'),'Root folder is not writable');
}
- public function testDirectories(){
+ public function testDirectories() {
$this->assertFalse($this->instance->file_exists('/folder'));
$this->assertTrue($this->instance->mkdir('/folder'));
@@ -55,8 +55,8 @@ abstract class Test_FileStorage extends UnitTestCase {
$dh=$this->instance->opendir('/');
$content=array();
- while($file=readdir($dh)){
- if($file!='.' and $file!='..'){
+ while($file=readdir($dh)) {
+ if($file!='.' and $file!='..') {
$content[]=$file;
}
}
@@ -71,8 +71,8 @@ abstract class Test_FileStorage extends UnitTestCase {
$dh=$this->instance->opendir('/');
$content=array();
- while($file=readdir($dh)){
- if($file!='.' and $file!='..'){
+ while($file=readdir($dh)) {
+ if($file!='.' and $file!='..') {
$content[]=$file;
}
}
@@ -82,7 +82,7 @@ abstract class Test_FileStorage extends UnitTestCase {
/**
* test the various uses of file_get_contents and file_put_contents
*/
- public function testGetPutContents(){
+ public function testGetPutContents() {
$sourceFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$sourceText=file_get_contents($sourceFile);
@@ -99,7 +99,7 @@ abstract class Test_FileStorage extends UnitTestCase {
/**
* test various known mimetypes
*/
- public function testMimeType(){
+ public function testMimeType() {
$this->assertEqual('httpd/unix-directory',$this->instance->getMimeType('/'));
$this->assertEqual(false,$this->instance->getMimeType('/non/existing/file'));
@@ -116,7 +116,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertEqual('image/svg+xml',$this->instance->getMimeType('/logo-wide.svg'));
}
- public function testCopyAndMove(){
+ public function testCopyAndMove() {
$textFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/source.txt',file_get_contents($textFile));
$this->instance->copy('/source.txt','/target.txt');
@@ -129,7 +129,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertEqual(file_get_contents($textFile),$this->instance->file_get_contents('/target.txt'));
}
- public function testLocal(){
+ public function testLocal() {
$textFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile));
$localFile=$this->instance->getLocalFile('/lorem.txt');
@@ -150,7 +150,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertEqual(file_get_contents($localFolder.'/recursive/file.txt'),'foo');
}
- public function testStat(){
+ public function testStat() {
$textFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$ctimeStart=time();
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile));
@@ -158,7 +158,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$ctimeEnd=time();
$cTime=$this->instance->filectime('/lorem.txt');
$mTime=$this->instance->filemtime('/lorem.txt');
- if($cTime!=-1){//not everything can support ctime
+ if($cTime!=-1) {//not everything can support ctime
$this->assertTrue(($ctimeStart-1)<=$cTime);
$this->assertTrue($cTime<=($ctimeEnd+1));
}
@@ -187,7 +187,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertTrue($this->instance->hasUpdated('/lorem.txt',$mtimeStart-1));
- if($this->instance->touch('/lorem.txt',100)!==false){
+ if($this->instance->touch('/lorem.txt',100)!==false) {
$mTime=$this->instance->filemtime('/lorem.txt');
$this->assertEqual($mTime,100);
}
@@ -207,7 +207,7 @@ abstract class Test_FileStorage extends UnitTestCase {
$this->assertTrue($this->instance->hasUpdated('/',$mtimeStart-1));
}
- public function testSearch(){
+ public function testSearch() {
$textFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$this->instance->file_put_contents('/lorem.txt',file_get_contents($textFile,'r'));
$pngFile=OC::$SERVERROOT.'/tests/data/logo-wide.png';
diff --git a/tests/lib/filestorage/commontest.php b/tests/lib/filestorage/commontest.php
index ab5375ec2b0..89e83589e5d 100644
--- a/tests/lib/filestorage/commontest.php
+++ b/tests/lib/filestorage/commontest.php
@@ -25,15 +25,15 @@ class Test_Filestorage_CommonTest extends Test_FileStorage {
* @var string tmpDir
*/
private $tmpDir;
- public function setUp(){
+ public function setUp() {
$this->tmpDir=get_temp_dir().'/filestoragecommon';
- if(!file_exists($this->tmpDir)){
+ if(!file_exists($this->tmpDir)) {
mkdir($this->tmpDir);
}
$this->instance=new OC_Filestorage_CommonTest(array('datadir'=>$this->tmpDir));
}
- public function tearDown(){
+ public function tearDown() {
OC_Helper::rmdirr($this->tmpDir);
}
}
diff --git a/tests/lib/filestorage/local.php b/tests/lib/filestorage/local.php
index 692f05f9fca..f68fb69b97f 100644
--- a/tests/lib/filestorage/local.php
+++ b/tests/lib/filestorage/local.php
@@ -25,12 +25,12 @@ class Test_Filestorage_Local extends Test_FileStorage {
* @var string tmpDir
*/
private $tmpDir;
- public function setUp(){
+ public function setUp() {
$this->tmpDir=OC_Helper::tmpFolder();
$this->instance=new OC_Filestorage_Local(array('datadir'=>$this->tmpDir));
}
- public function tearDown(){
+ public function tearDown() {
OC_Helper::rmdirr($this->tmpDir);
}
}
diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php
index 72af0835788..1cfa35e305d 100644
--- a/tests/lib/filesystem.php
+++ b/tests/lib/filesystem.php
@@ -29,23 +29,23 @@ class Test_Filesystem extends UnitTestCase{
/**
* @return array
*/
- private function getStorageData(){
+ private function getStorageData() {
$dir=OC_Helper::tmpFolder();
$this->tmpDirs[]=$dir;
return array('datadir'=>$dir);
}
- public function tearDown(){
- foreach($this->tmpDirs as $dir){
+ public function tearDown() {
+ foreach($this->tmpDirs as $dir) {
OC_Helper::rmdirr($dir);
}
}
- public function setUp(){
+ public function setUp() {
OC_Filesystem::clearMounts();
}
- public function testMount(){
+ public function testMount() {
OC_Filesystem::mount('OC_Filestorage_Local',self::getStorageData(),'/');
$this->assertEqual('/',OC_Filesystem::getMountPoint('/'));
$this->assertEqual('/',OC_Filesystem::getMountPoint('/some/folder'));
@@ -60,14 +60,14 @@ class Test_Filesystem extends UnitTestCase{
$this->assertEqual('folder',OC_Filesystem::getInternalPath('/some/folder'));
}
- public function testNormalize(){
+ public function testNormalize() {
$this->assertEqual('/path',OC_Filesystem::normalizePath('/path/'));
$this->assertEqual('/path/',OC_Filesystem::normalizePath('/path/',false));
$this->assertEqual('/path',OC_Filesystem::normalizePath('path'));
$this->assertEqual('/path',OC_Filesystem::normalizePath('\path'));
$this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo//bar/'));
$this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo////bar'));
- if(class_exists('Normalizer')){
+ if(class_exists('Normalizer')) {
$this->assertEqual("/foo/bar\xC3\xBC",OC_Filesystem::normalizePath("/foo/baru\xCC\x88"));
}
}
diff --git a/tests/lib/group.php b/tests/lib/group.php
index 922613211bc..0bea9a00886 100644
--- a/tests/lib/group.php
+++ b/tests/lib/group.php
@@ -21,11 +21,11 @@
*/
class Test_Group extends UnitTestCase {
- function setUp(){
+ function setUp() {
OC_Group::clearBackends();
}
- function testSingleBackend(){
+ function testSingleBackend() {
OC_Group::useBackend(new OC_Group_Dummy());
$group1=uniqid();
@@ -62,7 +62,7 @@ class Test_Group extends UnitTestCase {
$this->assertFalse(OC_Group::inGroup($user1,$group1));
}
- function testMultiBackend(){
+ function testMultiBackend() {
$backend1=new OC_Group_Dummy();
$backend2=new OC_Group_Dummy();
OC_Group::useBackend($backend1);
diff --git a/tests/lib/group/backend.php b/tests/lib/group/backend.php
index 9405e90aabf..61e008b6ca5 100644
--- a/tests/lib/group/backend.php
+++ b/tests/lib/group/backend.php
@@ -31,7 +31,7 @@ abstract class Test_Group_Backend extends UnitTestCase {
* test cases can override this in order to clean up created groups
* @return array
*/
- public function getGroupName(){
+ public function getGroupName() {
return uniqid('test_');
}
@@ -40,11 +40,11 @@ abstract class Test_Group_Backend extends UnitTestCase {
* test cases can override this in order to clean up created user
* @return array
*/
- public function getUserName(){
+ public function getUserName() {
return uniqid('test_');
}
- public function testAddRemove(){
+ public function testAddRemove() {
//get the number of groups we start with, in case there are exising groups
$startCount=count($this->backend->getGroups());
@@ -68,7 +68,7 @@ abstract class Test_Group_Backend extends UnitTestCase {
$this->assertFalse((array_search($name2,$this->backend->getGroups())!==false));
}
- public function testUser(){
+ public function testUser() {
$group1=$this->getGroupName();
$group2=$this->getGroupName();
$this->backend->createGroup($group1);
diff --git a/tests/lib/group/database.php b/tests/lib/group/database.php
index fb51bc8d8d9..5278c26f4df 100644
--- a/tests/lib/group/database.php
+++ b/tests/lib/group/database.php
@@ -28,7 +28,7 @@ class Test_Group_Database extends Test_Group_Backend {
* test cases can override this in order to clean up created groups
* @return array
*/
- public function getGroupName(){
+ public function getGroupName() {
$name=uniqid('test_');
$this->groups[]=$name;
return $name;
@@ -39,16 +39,16 @@ class Test_Group_Database extends Test_Group_Backend {
* test cases can override this in order to clean up created user
* @return array
*/
- public function getUserName(){
+ public function getUserName() {
return uniqid('test_');
}
- public function setUp(){
+ public function setUp() {
$this->backend=new OC_Group_Database();
}
- public function tearDown(){
- foreach($this->groups as $group){
+ public function tearDown() {
+ foreach($this->groups as $group) {
$this->backend->deleteGroup($group);
}
}
diff --git a/tests/lib/group/dummy.php b/tests/lib/group/dummy.php
index d0b475d3ec5..287d6f1a977 100644
--- a/tests/lib/group/dummy.php
+++ b/tests/lib/group/dummy.php
@@ -21,7 +21,7 @@
*/
class Test_Group_Dummy extends Test_Group_Backend {
- public function setUp(){
+ public function setUp() {
$this->backend=new OC_Group_Dummy();
}
}
diff --git a/tests/lib/streamwrappers.php b/tests/lib/streamwrappers.php
index 17a92c6658c..5d6fe8da826 100644
--- a/tests/lib/streamwrappers.php
+++ b/tests/lib/streamwrappers.php
@@ -21,19 +21,19 @@
*/
class Test_StreamWrappers extends UnitTestCase {
- public function testFakeDir(){
+ public function testFakeDir() {
$items=array('foo','bar');
OC_FakeDirStream::$dirs['test']=$items;
$dh=opendir('fakedir://test');
$result=array();
- while($file=readdir($dh)){
+ while($file=readdir($dh)) {
$result[]=$file;
$this->assertNotIdentical(false,array_search($file,$items));
}
$this->assertEqual(count($items),count($result));
}
- public function testStaticStream(){
+ public function testStaticStream() {
$sourceFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$staticFile='static://test';
$this->assertFalse(file_exists($staticFile));
@@ -45,7 +45,7 @@ class Test_StreamWrappers extends UnitTestCase {
$this->assertFalse(file_exists($staticFile));
}
- public function testCloseStream(){
+ public function testCloseStream() {
//ensure all basic stream stuff works
$sourceFile=OC::$SERVERROOT.'/tests/data/lorem.txt';
$tmpFile=OC_Helper::TmpFile('.txt');
@@ -66,13 +66,13 @@ class Test_StreamWrappers extends UnitTestCase {
try{
fclose($fh);
$this->fail('Expected exception');
- }catch(Exception $e){
+ }catch(Exception $e) {
$path=$e->getMessage();
$this->assertEqual($path,$tmpFile);
}
}
- public static function closeCallBack($path){
+ public static function closeCallBack($path) {
throw new Exception($path);
}
} \ No newline at end of file
diff --git a/tests/lib/user/backend.php b/tests/lib/user/backend.php
index 984249e84eb..c69c1bad512 100644
--- a/tests/lib/user/backend.php
+++ b/tests/lib/user/backend.php
@@ -41,11 +41,11 @@ abstract class Test_User_Backend extends UnitTestCase {
* test cases can override this in order to clean up created user
* @return array
*/
- public function getUser(){
+ public function getUser() {
return uniqid('test_');
}
- public function testAddRemove(){
+ public function testAddRemove() {
//get the number of groups we start with, in case there are exising groups
$startCount=count($this->backend->getUsers());
@@ -69,7 +69,7 @@ abstract class Test_User_Backend extends UnitTestCase {
$this->assertFalse((array_search($name2,$this->backend->getUsers())!==false));
}
- public function testLogin(){
+ public function testLogin() {
$name1=$this->getUser();
$name2=$this->getUser();
diff --git a/tests/lib/user/database.php b/tests/lib/user/database.php
index f484ffa78f7..fe7d87c44de 100644
--- a/tests/lib/user/database.php
+++ b/tests/lib/user/database.php
@@ -26,18 +26,18 @@ class Test_User_Database extends Test_User_Backend {
* test cases can override this in order to clean up created user
* @return array
*/
- public function getUser(){
+ public function getUser() {
$user=uniqid('test_');
$this->users[]=$user;
return $user;
}
- public function setUp(){
+ public function setUp() {
$this->backend=new OC_User_Dummy();
}
- public function tearDown(){
- foreach($this->users as $user){
+ public function tearDown() {
+ foreach($this->users as $user) {
$this->backend->deleteUser($user);
}
}
diff --git a/tests/lib/user/dummy.php b/tests/lib/user/dummy.php
index 062f55ba079..e417fd97603 100644
--- a/tests/lib/user/dummy.php
+++ b/tests/lib/user/dummy.php
@@ -21,7 +21,7 @@
*/
class Test_User_Dummy extends Test_User_Backend {
- public function setUp(){
+ public function setUp() {
$this->backend=new OC_User_Dummy();
}
}