aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFelix Moeller <mail@felixmoeller.de>2012-11-04 10:46:32 +0100
committerFelix Moeller <mail@felixmoeller.de>2012-11-04 10:46:32 +0100
commitf8d1d7787e1112842db81a629dfd84b586fbebda (patch)
tree65ca5da914f492411485ccb61a707b00686ba8f6 /tests
parent17d466b03b91ccc058fe1a88340df36c22a580c2 (diff)
downloadnextcloud-server-f8d1d7787e1112842db81a629dfd84b586fbebda.tar.gz
nextcloud-server-f8d1d7787e1112842db81a629dfd84b586fbebda.zip
Checkstyle fixes for SpaceBeforeOpenBrace
Diffstat (limited to 'tests')
-rw-r--r--tests/bootstrap.php10
-rw-r--r--tests/lib/cache.php2
-rw-r--r--tests/lib/cache/apc.php4
-rw-r--r--tests/lib/cache/xcache.php2
-rw-r--r--tests/lib/template.php8
5 files changed, 13 insertions, 13 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index f8364b71ef7..4080a974be7 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -2,25 +2,25 @@
require_once __DIR__.'/../lib/base.php';
-if(!class_exists('PHPUnit_Framework_TestCase')){
+if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php');
}
//SimpleTest compatibility
abstract class UnitTestCase extends PHPUnit_Framework_TestCase{
- function assertEqual($expected, $actual, $string=''){
+ function assertEqual($expected, $actual, $string='') {
$this->assertEquals($expected, $actual, $string);
}
- function assertNotEqual($expected, $actual, $string=''){
+ function assertNotEqual($expected, $actual, $string='') {
$this->assertNotEquals($expected, $actual, $string);
}
- static function assertTrue($actual, $string=''){
+ static function assertTrue($actual, $string='') {
parent::assertTrue((bool)$actual, $string);
}
- static function assertFalse($actual, $string=''){
+ static function assertFalse($actual, $string='') {
parent::assertFalse((bool)$actual, $string);
}
}
diff --git a/tests/lib/cache.php b/tests/lib/cache.php
index 7f3eb3ee6fa..c104460ea4d 100644
--- a/tests/lib/cache.php
+++ b/tests/lib/cache.php
@@ -13,7 +13,7 @@ abstract class Test_Cache extends UnitTestCase {
protected $instance;
public function tearDown() {
- if($this->instance){
+ if($this->instance) {
$this->instance->clear();
}
}
diff --git a/tests/lib/cache/apc.php b/tests/lib/cache/apc.php
index f68b97bcbd9..bb5eb483dbf 100644
--- a/tests/lib/cache/apc.php
+++ b/tests/lib/cache/apc.php
@@ -22,11 +22,11 @@
class Test_Cache_APC extends Test_Cache {
public function setUp() {
- if(!extension_loaded('apc')){
+ if(!extension_loaded('apc')) {
$this->markTestSkipped('The apc extension is not available.');
return;
}
- if(!ini_get('apc.enable_cli') && OC::$CLI){
+ if(!ini_get('apc.enable_cli') && OC::$CLI) {
$this->markTestSkipped('apc not available in CLI.');
return;
}
diff --git a/tests/lib/cache/xcache.php b/tests/lib/cache/xcache.php
index c081036a31f..43bed2db037 100644
--- a/tests/lib/cache/xcache.php
+++ b/tests/lib/cache/xcache.php
@@ -22,7 +22,7 @@
class Test_Cache_XCache extends Test_Cache {
public function setUp() {
- if(!function_exists('xcache_get')){
+ if(!function_exists('xcache_get')) {
$this->markTestSkipped('The xcache extension is not available.');
return;
}
diff --git a/tests/lib/template.php b/tests/lib/template.php
index dadfdba5e0c..32ae4aca590 100644
--- a/tests/lib/template.php
+++ b/tests/lib/template.php
@@ -24,7 +24,7 @@ require_once("lib/template.php");
class Test_TemplateFunctions extends UnitTestCase {
- public function testP(){
+ public function testP() {
// FIXME: do we need more testcases?
$htmlString = "<script>alert('xss');</script>";
ob_start();
@@ -35,7 +35,7 @@ class Test_TemplateFunctions extends UnitTestCase {
$this->assertEqual("&lt;script&gt;alert(&#039;xss&#039;);&lt;/script&gt;", $result);
}
- public function testPNormalString(){
+ public function testPNormalString() {
$normalString = "This is a good string!";
ob_start();
p($normalString);
@@ -46,7 +46,7 @@ class Test_TemplateFunctions extends UnitTestCase {
}
- public function testPrintUnescaped(){
+ public function testPrintUnescaped() {
$htmlString = "<script>alert('xss');</script>";
ob_start();
@@ -57,7 +57,7 @@ class Test_TemplateFunctions extends UnitTestCase {
$this->assertEqual($htmlString, $result);
}
- public function testPrintUnescapedNormalString(){
+ public function testPrintUnescapedNormalString() {
$normalString = "This is a good string!";
ob_start();
print_unescaped($normalString);