aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Core/Controller/ClientFlowLoginControllerTest.php2
-rw-r--r--tests/acceptance/features/bootstrap/AppNavigationContext.php4
-rw-r--r--tests/acceptance/features/bootstrap/AppSettingsContext.php6
-rw-r--r--tests/acceptance/features/bootstrap/DialogContext.php2
-rw-r--r--tests/acceptance/features/bootstrap/SettingsMenuContext.php2
-rw-r--r--tests/lib/App/DependencyAnalyzerTest.php14
-rw-r--r--tests/lib/AppFramework/Http/RedirectResponseTest.php2
-rw-r--r--tests/lib/AutoLoaderTest.php4
-rw-r--r--tests/lib/DB/DBSchemaTest.php12
-rw-r--r--tests/lib/DB/LegacyDBTest.php6
-rw-r--r--tests/lib/DB/SchemaDiffTest.php2
-rw-r--r--tests/lib/Files/Stream/EncryptionTest.php2
-rw-r--r--tests/lib/Group/ManagerTest.php64
-rw-r--r--tests/lib/Log/FileTest.php2
-rw-r--r--tests/lib/Preview/HEICTest.php2
-rw-r--r--tests/lib/SubAdminTest.php2
-rw-r--r--tests/lib/TestCase.php4
17 files changed, 66 insertions, 66 deletions
diff --git a/tests/Core/Controller/ClientFlowLoginControllerTest.php b/tests/Core/Controller/ClientFlowLoginControllerTest.php
index a997546270f..bc86c262d91 100644
--- a/tests/Core/Controller/ClientFlowLoginControllerTest.php
+++ b/tests/Core/Controller/ClientFlowLoginControllerTest.php
@@ -407,7 +407,7 @@ class ClientFlowLoginControllerTest extends TestCase {
* ["https://example.com/redirect.php?hello=world", "https://example.com/redirect.php?hello=world&state=MyOauthState&code=MyAccessCode"]
*
*/
- public function testGeneratePasswordWithPasswordForOauthClient($redirectUri, $redirectUrl) {
+ public function testGeneratePasswordWithPasswordForOauthClient($redirectUri, $redirectUrl) {
$this->session
->expects($this->at(0))
->method('get')
diff --git a/tests/acceptance/features/bootstrap/AppNavigationContext.php b/tests/acceptance/features/bootstrap/AppNavigationContext.php
index 02a8b1c0152..0fd9e92e9e4 100644
--- a/tests/acceptance/features/bootstrap/AppNavigationContext.php
+++ b/tests/acceptance/features/bootstrap/AppNavigationContext.php
@@ -1,10 +1,10 @@
<?php
/**
- *
+ *
* @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
* @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- *
+ *
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
diff --git a/tests/acceptance/features/bootstrap/AppSettingsContext.php b/tests/acceptance/features/bootstrap/AppSettingsContext.php
index 5cf54cb5280..a75cce29936 100644
--- a/tests/acceptance/features/bootstrap/AppSettingsContext.php
+++ b/tests/acceptance/features/bootstrap/AppSettingsContext.php
@@ -1,10 +1,10 @@
<?php
/**
- *
+ *
* @copyright Copyright (c) 2017, Daniel Calviño Sánchez (danxuliu@gmail.com)
* @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- *
+ *
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
@@ -90,7 +90,7 @@ class AppSettingsContext implements Context, ActorAwareInterface {
}
$this->actor->find($locator)->click();
- }
+ }
/**
* @Then I see that the settings are opened
diff --git a/tests/acceptance/features/bootstrap/DialogContext.php b/tests/acceptance/features/bootstrap/DialogContext.php
index 8f387992b5f..0558123ad9d 100644
--- a/tests/acceptance/features/bootstrap/DialogContext.php
+++ b/tests/acceptance/features/bootstrap/DialogContext.php
@@ -1,7 +1,7 @@
<?php
/**
- *
+ *
* @copyright Copyright (c) 2018, John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
*
* @license GNU AGPL version 3 or any later version
diff --git a/tests/acceptance/features/bootstrap/SettingsMenuContext.php b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
index e4e20997fc2..a740e98756b 100644
--- a/tests/acceptance/features/bootstrap/SettingsMenuContext.php
+++ b/tests/acceptance/features/bootstrap/SettingsMenuContext.php
@@ -103,7 +103,7 @@ class SettingsMenuContext implements Context, ActorAwareInterface {
}
/**
- * @return array
+ * @return array
*/
public function menuItems() {
return $this->actor->find(self::settingsMenu(), 10)
diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php
index 9ac44b97cc5..40cd308f886 100644
--- a/tests/lib/App/DependencyAnalyzerTest.php
+++ b/tests/lib/App/DependencyAnalyzerTest.php
@@ -32,24 +32,24 @@ class DependencyAnalyzerTest extends TestCase {
->getMock();
$this->platformMock->expects($this->any())
->method('getPhpVersion')
- ->willReturn( '5.4.3');
+ ->willReturn('5.4.3');
$this->platformMock->expects($this->any())
->method('getIntSize')
- ->willReturn( '4');
+ ->willReturn('4');
$this->platformMock->expects($this->any())
->method('getDatabase')
- ->willReturn( 'mysql');
+ ->willReturn('mysql');
$this->platformMock->expects($this->any())
->method('getOS')
- ->willReturn( 'Linux');
+ ->willReturn('Linux');
$this->platformMock->expects($this->any())
->method('isCommandKnown')
- ->willReturnCallback( function ($command) {
+ ->willReturnCallback(function ($command) {
return ($command === 'grep');
});
$this->platformMock->expects($this->any())
->method('getLibraryVersion')
- ->willReturnCallback( function ($lib) {
+ ->willReturnCallback(function ($lib) {
if ($lib === 'curl') {
return "2.3.4";
}
@@ -57,7 +57,7 @@ class DependencyAnalyzerTest extends TestCase {
});
$this->platformMock->expects($this->any())
->method('getOcVersion')
- ->willReturn( '8.0.2');
+ ->willReturn('8.0.2');
$this->l10nMock = $this->getMockBuilder(IL10N::class)
->disableOriginalConstructor()
diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php
index b211df1846e..3c210092ca8 100644
--- a/tests/lib/AppFramework/Http/RedirectResponseTest.php
+++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php
@@ -42,7 +42,7 @@ class RedirectResponseTest extends \Test\TestCase {
public function testHeaders() {
$headers = $this->response->getHeaders();
$this->assertEquals('/url', $headers['Location']);
- $this->assertEquals(Http::STATUS_SEE_OTHER,
+ $this->assertEquals(Http::STATUS_SEE_OTHER,
$this->response->getStatus());
}
diff --git a/tests/lib/AutoLoaderTest.php b/tests/lib/AutoLoaderTest.php
index b3ca21a90d4..24eaa367435 100644
--- a/tests/lib/AutoLoaderTest.php
+++ b/tests/lib/AutoLoaderTest.php
@@ -21,7 +21,7 @@ class AutoLoaderTest extends TestCase {
public function testLegacyPath() {
$this->assertEquals([
- \OC::$SERVERROOT . '/lib/private/legacy/files.php',
+ \OC::$SERVERROOT . '/lib/private/legacy/files.php',
], $this->loader->findClass('OC_Files'));
}
@@ -33,7 +33,7 @@ class AutoLoaderTest extends TestCase {
public function testLoadCore() {
$this->assertEquals([
- \OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',
+ \OC::$SERVERROOT . '/lib/private/legacy/foo/bar.php',
], $this->loader->findClass('OC_Foo_Bar'));
}
diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php
index 5fb68fdf258..4b249d07c45 100644
--- a/tests/lib/DB/DBSchemaTest.php
+++ b/tests/lib/DB/DBSchemaTest.php
@@ -39,12 +39,12 @@ class DBSchemaTest extends TestCase {
$r = '_' . \OC::$server->getSecureRandom()->
generate(4, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS) . '_';
- $content = file_get_contents( $dbfile );
- $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
- file_put_contents( $this->schema_file, $content );
- $content = file_get_contents( $dbfile2 );
- $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
- file_put_contents( $this->schema_file2, $content );
+ $content = file_get_contents($dbfile);
+ $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content);
+ file_put_contents($this->schema_file, $content);
+ $content = file_get_contents($dbfile2);
+ $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content);
+ file_put_contents($this->schema_file2, $content);
$this->table1 = $r.'cntcts_addrsbks';
$this->table2 = $r.'cntcts_cards';
diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php
index cd4befdbe52..cf4c746a4dd 100644
--- a/tests/lib/DB/LegacyDBTest.php
+++ b/tests/lib/DB/LegacyDBTest.php
@@ -62,9 +62,9 @@ class LegacyDBTest extends \Test\TestCase {
$dbFile = \OC::$SERVERROOT.'/tests/data/db_structure.xml';
$r = $this->getUniqueID('_', 4).'_';
- $content = file_get_contents( $dbFile );
- $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
- file_put_contents( self::$schema_file, $content );
+ $content = file_get_contents($dbFile);
+ $content = str_replace('*dbprefix*', '*dbprefix*'.$r, $content);
+ file_put_contents(self::$schema_file, $content);
OC_DB::createDbFromStructure(self::$schema_file);
$this->test_prefix = $r;
diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php
index 78963698571..c98cf173d8f 100644
--- a/tests/lib/DB/SchemaDiffTest.php
+++ b/tests/lib/DB/SchemaDiffTest.php
@@ -72,7 +72,7 @@ class SchemaDiffTest extends TestCase {
*/
public function testZeroChangeOnSchemaMigrations($xml) {
- $xml = str_replace( '*dbprefix*', $this->testPrefix, $xml );
+ $xml = str_replace('*dbprefix*', $this->testPrefix, $xml);
$schemaFile = $this->schemaFile;
file_put_contents($schemaFile, $xml);
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php
index 5eab39efba3..f884aefb7d8 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -59,7 +59,7 @@ class EncryptionTest extends \Test\TestCase {
'fileid' => 5,
'encryptedVersion' => 2,
]);
- $cache->expects($this->any())->method('get')->willReturn($entry );
+ $cache->expects($this->any())->method('get')->willReturn($entry);
$cache->expects($this->any())->method('update')->with(5, ['encrypted' => 3, 'encryptedVersion' => 3]);
diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php
index c4b56b56fff..9437e62996c 100644
--- a/tests/lib/Group/ManagerTest.php
+++ b/tests/lib/Group/ManagerTest.php
@@ -548,9 +548,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid, $gid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
default:
return null;
@@ -562,9 +562,9 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 : return ['user3' => $this->getTestUser('user3'),
+ case 0: return ['user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33')];
- case 2 : return [];
+ case 2: return [];
}
return null;
});
@@ -572,9 +572,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -606,9 +606,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid, $gid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
case 'user333': return true;
default:
@@ -621,9 +621,9 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 : return ['user3' => $this->getTestUser('user3'),
+ case 0: return ['user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33')];
- case 2 : return ['user333' => $this->getTestUser('user333')];
+ case 2: return ['user333' => $this->getTestUser('user333')];
}
return null;
});
@@ -631,9 +631,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
case 'user333': return $this->getTestUser('user333');
default:
@@ -667,9 +667,9 @@ class ManagerTest extends TestCase {
->method('inGroup')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return false;
- case 'user2' : return true;
- case 'user3' : return false;
+ case 'user1': return false;
+ case 'user2': return true;
+ case 'user3': return false;
case 'user33': return true;
case 'user333': return true;
default:
@@ -682,7 +682,7 @@ class ManagerTest extends TestCase {
->with('user3')
->willReturnCallback(function ($search, $limit, $offset) {
switch($offset) {
- case 0 :
+ case 0:
return [
'user3' => $this->getTestUser('user3'),
'user33' => $this->getTestUser('user33'),
@@ -695,9 +695,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
case 'user333': return $this->getTestUser('user333');
default:
@@ -736,9 +736,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -775,9 +775,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
@@ -814,9 +814,9 @@ class ManagerTest extends TestCase {
->method('get')
->willReturnCallback(function ($uid) {
switch($uid) {
- case 'user1' : return $this->getTestUser('user1');
- case 'user2' : return $this->getTestUser('user2');
- case 'user3' : return $this->getTestUser('user3');
+ case 'user1': return $this->getTestUser('user1');
+ case 'user2': return $this->getTestUser('user2');
+ case 'user3': return $this->getTestUser('user3');
case 'user33': return $this->getTestUser('user33');
default:
return null;
diff --git a/tests/lib/Log/FileTest.php b/tests/lib/Log/FileTest.php
index 0bbcdc0a23c..35e118bf3b9 100644
--- a/tests/lib/Log/FileTest.php
+++ b/tests/lib/Log/FileTest.php
@@ -47,7 +47,7 @@ class FileTest extends TestCase
$config->getValue("logfile", $this->restore_logfile);
} else {
$config->deleteValue("logfile");
- }
+ }
if (isset($this->restore_logdateformat)) {
$config->getValue("logdateformat", $this->restore_logdateformat);
} else {
diff --git a/tests/lib/Preview/HEICTest.php b/tests/lib/Preview/HEICTest.php
index f75ae3192a1..ea937f4df3c 100644
--- a/tests/lib/Preview/HEICTest.php
+++ b/tests/lib/Preview/HEICTest.php
@@ -31,7 +31,7 @@ namespace Test\Preview;
class HEICTest extends Provider {
protected function setUp(): void {
- if ( !in_array("HEIC", \Imagick::queryFormats("HEI*")) ) {
+ if (!in_array("HEIC", \Imagick::queryFormats("HEI*"))) {
$this->markTestSkipped('ImageMagick is not HEIC aware. Skipping tests');
} else {
parent::setUp();
diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php
index b2c15894391..23207c8f721 100644
--- a/tests/lib/SubAdminTest.php
+++ b/tests/lib/SubAdminTest.php
@@ -113,7 +113,7 @@ class SubAdminTest extends \Test\TestCase {
->fetch();
$this->assertEquals(
[
- 'gid' => $this->groups[0]->getGID(),
+ 'gid' => $this->groups[0]->getGID(),
'uid' => $this->users[0]->getUID()
], $result);
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php
index 9d3070a0e28..c4ff92c223f 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -449,7 +449,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
}
$annotations = $this->getAnnotations();
if (isset($annotations['class']['group'])) {
- if(in_array('DB', $annotations['class']['group']) || in_array('SLOWDB', $annotations['class']['group']) ) {
+ if(in_array('DB', $annotations['class']['group']) || in_array('SLOWDB', $annotations['class']['group'])) {
return true;
}
}
@@ -516,7 +516,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase {
if($node->hasChildNodes()) {
$this->removeWhitespaces($node);
} else {
- if ($node instanceof \DOMText && $node->isWhitespaceInElementContent() ) {
+ if ($node instanceof \DOMText && $node->isWhitespaceInElementContent()) {
$domNode->removeChild($node);
}
}