aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-01-12 20:44:38 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-01-13 00:19:07 +0100
commit6312c0df6949955d1cd59c3dd444268e0773293c (patch)
tree1f517db2c7b1c6588a44d13e78b2ff49b2886708 /tests
parentaeecb72e96e54439f98822467bb727366207039f (diff)
downloadnextcloud-server-6312c0df6949955d1cd59c3dd444268e0773293c.tar.gz
nextcloud-server-6312c0df6949955d1cd59c3dd444268e0773293c.zip
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Db/QBMapperTest.php4
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php16
-rw-r--r--tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php10
-rw-r--r--tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php6
-rw-r--r--tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php18
-rw-r--r--tests/lib/Avatar/UserAvatarTest.php6
-rw-r--r--tests/lib/Cache/FileCacheTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php3
-rw-r--r--tests/lib/DateTimeFormatterTest.php2
-rw-r--r--tests/lib/Encryption/Keys/StorageTest.php2
-rw-r--r--tests/lib/Files/Cache/CacheTest.php18
-rw-r--r--tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php4
-rw-r--r--tests/lib/L10N/L10nTest.php2
-rw-r--r--tests/lib/Mail/MessageTest.php6
-rw-r--r--tests/lib/Security/HasherTest.php2
-rw-r--r--tests/lib/Share20/DefaultShareProviderTest.php6
-rw-r--r--tests/lib/Share20/ManagerTest.php124
-rw-r--r--tests/lib/User/UserTest.php14
18 files changed, 119 insertions, 126 deletions
diff --git a/tests/lib/AppFramework/Db/QBMapperTest.php b/tests/lib/AppFramework/Db/QBMapperTest.php
index 7865979ef41..b03034056d2 100644
--- a/tests/lib/AppFramework/Db/QBMapperTest.php
+++ b/tests/lib/AppFramework/Db/QBMapperTest.php
@@ -109,11 +109,11 @@ class QBMapperTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
- $this->qb = $this->getMockBuilder(IQueryBuilder:: class)
+ $this->qb = $this->getMockBuilder(IQueryBuilder::class)
->disableOriginalConstructor()
->getMock();
- $this->expr = $this->getMockBuilder(IExpressionBuilder:: class)
+ $this->expr = $this->getMockBuilder(IExpressionBuilder::class)
->disableOriginalConstructor()
->getMock();
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 7260b31b27e..a4a03b6479c 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -1062,7 +1062,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('from.server.name:8080', $request->getInsecureServerHost());
+ $this->assertSame('from.server.name:8080', $request->getInsecureServerHost());
}
public function testInsecureServerHostHttpHostHeader() {
@@ -1079,7 +1079,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('from.host.header:8080', $request->getInsecureServerHost());
+ $this->assertSame('from.host.header:8080', $request->getInsecureServerHost());
}
public function testInsecureServerHostHttpFromForwardedHeaderSingle() {
@@ -1108,7 +1108,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('from.forwarded.host:8080', $request->getInsecureServerHost());
+ $this->assertSame('from.forwarded.host:8080', $request->getInsecureServerHost());
}
public function testInsecureServerHostHttpFromForwardedHeaderStacked() {
@@ -1137,7 +1137,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('from.forwarded.host2:8080', $request->getInsecureServerHost());
+ $this->assertSame('from.forwarded.host2:8080', $request->getInsecureServerHost());
}
public function testGetServerHostWithOverwriteHost() {
@@ -1161,7 +1161,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('my.overwritten.host', $request->getServerHost());
+ $this->assertSame('my.overwritten.host', $request->getServerHost());
}
public function testGetServerHostWithTrustedDomain() {
@@ -1190,7 +1190,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('my.trusted.host', $request->getServerHost());
+ $this->assertSame('my.trusted.host', $request->getServerHost());
}
public function testGetServerHostWithUntrustedDomain() {
@@ -1219,7 +1219,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('my.trusted.host', $request->getServerHost());
+ $this->assertSame('my.trusted.host', $request->getServerHost());
}
public function testGetServerHostWithNoTrustedDomain() {
@@ -1245,7 +1245,7 @@ class RequestTest extends \Test\TestCase {
$this->stream
);
- $this->assertSame('', $request->getServerHost());
+ $this->assertSame('', $request->getServerHost());
}
/**
diff --git a/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php
index 3eeac3ef103..5dd13942097 100644
--- a/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/CompressionMiddlewareTest.php
@@ -68,7 +68,7 @@ class CompressionMiddlewareTest extends \Test\TestCase {
->willReturn(Http::STATUS_OK);
$this->middleWare->beforeController($this->controller, 'myMethod');
- $this->middleWare->afterController($this->controller,'myMethod', $response);
+ $this->middleWare->afterController($this->controller, 'myMethod', $response);
$output = 'myoutput';
$result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output);
@@ -90,7 +90,7 @@ class CompressionMiddlewareTest extends \Test\TestCase {
->willReturn(Http::STATUS_OK);
$this->middleWare->beforeController($this->controller, 'myMethod');
- $this->middleWare->afterController($this->controller,'myMethod', $response);
+ $this->middleWare->afterController($this->controller, 'myMethod', $response);
$output = 'myoutput';
$result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output);
@@ -112,7 +112,7 @@ class CompressionMiddlewareTest extends \Test\TestCase {
->willReturn(Http::STATUS_OK);
$this->middleWare->beforeController($this->controller, 'myMethod');
- $this->middleWare->afterController($this->controller,'myMethod', $response);
+ $this->middleWare->afterController($this->controller, 'myMethod', $response);
$output = 'myoutput';
$result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output);
@@ -132,7 +132,7 @@ class CompressionMiddlewareTest extends \Test\TestCase {
$response->method('getStatus')
->willReturn(Http::STATUS_OK);
$this->middleWare->beforeController($this->controller, 'myMethod');
- $this->middleWare->afterController($this->controller,'myMethod', $response);
+ $this->middleWare->afterController($this->controller, 'myMethod', $response);
$output = 'myoutput';
$result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output);
@@ -153,7 +153,7 @@ class CompressionMiddlewareTest extends \Test\TestCase {
->willReturn(Http::STATUS_NOT_FOUND);
$this->middleWare->beforeController($this->controller, 'myMethod');
- $this->middleWare->afterController($this->controller,'myMethod', $response);
+ $this->middleWare->afterController($this->controller, 'myMethod', $response);
$output = 'myoutput';
$result = $this->middleWare->beforeOutput($this->controller, 'myMethod', $output);
diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
index 786bac6d856..cc04992ae18 100644
--- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
@@ -135,7 +135,7 @@ class BruteForceMiddlewareTest extends TestCase {
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
+ $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response);
}
public function testAfterControllerWithAnnotationAndNotThrottledRequest() {
@@ -165,7 +165,7 @@ class BruteForceMiddlewareTest extends TestCase {
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
- $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
+ $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response);
}
public function testAfterControllerWithoutAnnotation() {
@@ -188,6 +188,6 @@ class BruteForceMiddlewareTest extends TestCase {
$controller = $this->createMock(Controller::class);
/** @var Response|\PHPUnit\Framework\MockObject\MockObject $response */
$response = $this->createMock(Response::class);
- $this->bruteForceMiddleware->afterController($controller, 'testMethod' ,$response);
+ $this->bruteForceMiddleware->afterController($controller, 'testMethod', $response);
}
}
diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
index bf84a631f74..1af2b2b9f1c 100644
--- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php
@@ -446,7 +446,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
* @SubAdminRequired
*/
public function testIsNotSubAdminCheck() {
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$sec = $this->getMiddleware(true, false, false);
$this->expectException(SecurityException::class);
@@ -458,7 +458,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
* @SubAdminRequired
*/
public function testIsSubAdminCheck() {
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$sec = $this->getMiddleware(true, false, true);
$sec->beforeController($this, __METHOD__);
@@ -470,7 +470,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
* @SubAdminRequired
*/
public function testIsSubAdminAndAdminCheck() {
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$sec = $this->getMiddleware(true, true, true);
$sec->beforeController($this, __METHOD__);
@@ -523,7 +523,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
new NotLoggedInException()
);
$expected = new RedirectResponse('http://localhost/nextcloud/index.php/login?redirect_url=nextcloud/index.php/apps/specialapp');
- $this->assertEquals($expected , $response);
+ $this->assertEquals($expected, $response);
}
public function testAfterExceptionRedirectsToWebRootAfterStrictCookieFail() {
@@ -546,7 +546,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
);
$expected = new RedirectResponse(\OC::$WEBROOT . '/');
- $this->assertEquals($expected , $response);
+ $this->assertEquals($expected, $response);
}
@@ -594,7 +594,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
);
$expected = new TemplateResponse('core', '403', ['message' => $exception->getMessage()], 'guest');
$expected->setStatus($exception->getCode());
- $this->assertEquals($expected , $response);
+ $this->assertEquals($expected, $response);
}
public function testAfterAjaxExceptionReturnsJSONError() {
@@ -624,7 +624,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
*/
public function testRestrictedAppLoggedInPublicPage() {
$middleware = $this->getMiddleware(true, false, false);
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$this->appManager->method('getAppPath')
->with('files')
@@ -645,7 +645,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
*/
public function testRestrictedAppNotLoggedInPublicPage() {
$middleware = $this->getMiddleware(false, false, false);
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$this->appManager->method('getAppPath')
->with('files')
@@ -665,7 +665,7 @@ class SecurityMiddlewareTest extends \Test\TestCase {
*/
public function testRestrictedAppLoggedIn() {
$middleware = $this->getMiddleware(true, false, false, false);
- $this->reader->reflect(__CLASS__,__FUNCTION__);
+ $this->reader->reflect(__CLASS__, __FUNCTION__);
$this->appManager->method('getAppPath')
->with('files')
diff --git a/tests/lib/Avatar/UserAvatarTest.php b/tests/lib/Avatar/UserAvatarTest.php
index 7833e3a4953..dd5f25163f2 100644
--- a/tests/lib/Avatar/UserAvatarTest.php
+++ b/tests/lib/Avatar/UserAvatarTest.php
@@ -258,8 +258,8 @@ class UserAvatarTest extends \Test\TestCase {
}
public function testMixPalette() {
- $colorFrom = new \OC\Color(0,0,0);
- $colorTo = new \OC\Color(6,12,18);
+ $colorFrom = new \OC\Color(0, 0, 0);
+ $colorTo = new \OC\Color(6, 12, 18);
$steps = 6;
$palette = $this->invokePrivate($this->avatar, 'mixPalette', [$steps, $colorFrom, $colorTo]);
foreach ($palette as $j => $color) {
@@ -268,7 +268,7 @@ class UserAvatarTest extends \Test\TestCase {
$incG = $colorTo->g / $steps * $j;
$incB = $colorTo->b / $steps * $j;
// ensure everything is equal
- $this->assertEquals($color, new \OC\Color($incR, $incG,$incB));
+ $this->assertEquals($color, new \OC\Color($incR, $incG, $incB));
}
$hashToInt = $this->invokePrivate($this->avatar, 'hashToInt', ['abcdef', 18]);
$this->assertTrue(gettype($hashToInt) === 'integer');
diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php
index c9eafeca280..5791e28eb0c 100644
--- a/tests/lib/Cache/FileCacheTest.php
+++ b/tests/lib/Cache/FileCacheTest.php
@@ -63,7 +63,7 @@ class FileCacheTest extends TestCache {
$this->storage = \OC\Files\Filesystem::getStorage('/');
\OC\Files\Filesystem::clearMounts();
$storage = new \OC\Files\Storage\Temporary([]);
- \OC\Files\Filesystem::mount($storage,[],'/');
+ \OC\Files\Filesystem::mount($storage, [], '/');
$datadir = str_replace('local::', '', $storage->getId());
$config = \OC::$server->getConfig();
$this->datadir = $config->getSystemValue('cachedirectory', \OC::$SERVERROOT.'/data/cache');
diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
index 6a568d7e01b..4a168cb0143 100644
--- a/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
+++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderDBTest.php
@@ -122,8 +122,7 @@ class ExpressionBuilderDBTest extends TestCase {
$query->createFunction(
'(' . $query->expr()->castColumn('configvalue', IQueryBuilder::PARAM_INT)
. ' + 1)'
- )
- , IQueryBuilder::PARAM_STR
+ ), IQueryBuilder::PARAM_STR
)
)
->where($query->expr()->eq('appid', $query->createNamedParameter($appId)))
diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php
index 78ef0ef3ace..2ca880ec132 100644
--- a/tests/lib/DateTimeFormatterTest.php
+++ b/tests/lib/DateTimeFormatterTest.php
@@ -100,7 +100,7 @@ class DateTimeFormatterTest extends TestCase {
['in 2 years', $time, $this->getTimestampAgo($time, 0, 0, 0, 0, 2)],
// Test with compare timestamp
- ['today', $this->getTimestampAgo($time, 0, 0, 0, 0, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
+ ['today', $this->getTimestampAgo($time, 0, 0, 0, 0, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
['yesterday', $this->getTimestampAgo($time, 30, 15, 3, 1, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
['4 days ago', $this->getTimestampAgo($time, 30, 15, 3, 4, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
['5 months ago', $this->getTimestampAgo($time, 30, 15, 3, 155, 1), $this->getTimestampAgo($time, 0, 0, 0, 0, 1)],
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index fdfa08d87c4..30680646f73 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -452,7 +452,7 @@ class StorageTest extends TestCase {
/**
* @dataProvider dataProviderCopyRename
*/
- public function testCopyKeys($source, $target, $systemWideMountSource, $systemWideMountTarget , $expectedSource, $expectedTarget) {
+ public function testCopyKeys($source, $target, $systemWideMountSource, $systemWideMountTarget, $expectedSource, $expectedTarget) {
$this->view->expects($this->any())
->method('file_exists')
->willReturn(true);
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 744a779288d..7f8e1af1577 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -399,23 +399,17 @@ class CacheTest extends \Test\TestCase {
$user = $this->createMock(IUser::class);
$this->assertCount(1, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'name', 'foo')
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'name', 'foo'), 10, 0, [], $user)));
$this->assertCount(2, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', 'foo%')
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_LIKE, 'name', 'foo%'), 10, 0, [], $user)));
$this->assertCount(2, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'mimetype', 'foo/file')
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'mimetype', 'foo/file'), 10, 0, [], $user)));
$this->assertCount(3, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', 'foo/%')
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', 'foo/%'), 10, 0, [], $user)));
$this->assertCount(1, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_GREATER_THAN, 'size', 100)
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_GREATER_THAN, 'size', 100), 10, 0, [], $user)));
$this->assertCount(2, $this->cache->searchQuery(new SearchQuery(
- new SearchComparison(ISearchComparison::COMPARE_GREATER_THAN_EQUAL, 'size', 100)
- , 10, 0, [], $user)));
+ new SearchComparison(ISearchComparison::COMPARE_GREATER_THAN_EQUAL, 'size', 100), 10, 0, [], $user)));
}
public function movePathProvider() {
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
index 85a68be3daf..5ebfd48d1a6 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php
@@ -89,7 +89,7 @@ class ObjectStoreStorageTest extends Storage {
*/
public function testMove($source, $target) {
$this->initSourceAndTarget($source);
- $sourceId = $this->instance->getCache()->getId(ltrim('/',$source));
+ $sourceId = $this->instance->getCache()->getId(ltrim('/', $source));
$this->assertNotEquals(-1, $sourceId);
$this->instance->rename($source, $target);
@@ -98,7 +98,7 @@ class ObjectStoreStorageTest extends Storage {
$this->assertFalse($this->instance->file_exists($source), $source.' still exists');
$this->assertSameAsLorem($target);
- $targetId = $this->instance->getCache()->getId(ltrim('/',$target));
+ $targetId = $this->instance->getCache()->getId(ltrim('/', $target));
$this->assertSame($sourceId, $targetId, 'fileid must be stable on move or shares will break');
}
diff --git a/tests/lib/L10N/L10nTest.php b/tests/lib/L10N/L10nTest.php
index 3fb22b3f66e..9f6337ba804 100644
--- a/tests/lib/L10N/L10nTest.php
+++ b/tests/lib/L10N/L10nTest.php
@@ -45,7 +45,7 @@ class L10nTest extends TestCase {
public function testRussianPluralTranslations() {
$transFile = \OC::$SERVERROOT.'/tests/data/l10n/ru.json';
- $l = new L10N($this->getFactory(), 'test', 'ru', 'ru_UA',[$transFile]);
+ $l = new L10N($this->getFactory(), 'test', 'ru', 'ru_UA', [$transFile]);
$this->assertEquals('1 файл', (string)$l->n('%n file', '%n files', 1));
$this->assertEquals('2 файла', (string)$l->n('%n file', '%n files', 2));
diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php
index b0641ae332f..f30630824fc 100644
--- a/tests/lib/Mail/MessageTest.php
+++ b/tests/lib/Mail/MessageTest.php
@@ -113,7 +113,7 @@ class MessageTest extends TestCase {
/**
* @dataProvider getMailAddressProvider
*/
- public function testGetTo($swiftresult,$return) {
+ public function testGetTo($swiftresult, $return) {
$this->swiftMessage
->expects($this->once())
->method('getTo')
@@ -133,7 +133,7 @@ class MessageTest extends TestCase {
/**
* @dataProvider getMailAddressProvider
*/
- public function testGetCc($swiftresult,$return) {
+ public function testGetCc($swiftresult, $return) {
$this->swiftMessage
->expects($this->once())
->method('getCc')
@@ -153,7 +153,7 @@ class MessageTest extends TestCase {
/**
* @dataProvider getMailAddressProvider
*/
- public function testGetBcc($swiftresult,$return) {
+ public function testGetBcc($swiftresult, $return) {
$this->swiftMessage
->expects($this->once())
->method('getBcc')
diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php
index 5836703504e..a81f98533ce 100644
--- a/tests/lib/Security/HasherTest.php
+++ b/tests/lib/Security/HasherTest.php
@@ -197,7 +197,7 @@ class HasherTest extends \Test\TestCase {
}
- $this->assertTrue($this->hasher->verify($message, $blowfish,$newHash));
+ $this->assertTrue($this->hasher->verify($message, $blowfish, $newHash));
$this->assertTrue($this->hasher->verify($message, $argon2));
$relativePath = self::invokePrivate($this->hasher, 'splitHash', [$newHash]);
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php
index 40626bdb571..03e1bdb4346 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -951,7 +951,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->rootFolder->method('getUserFolder')->with('shareOwner')->willReturnSelf();
$this->rootFolder->method('getById')->with($fileId)->willReturn([$file]);
- $share = $this->provider->getSharedWith('sharedWith', IShare::TYPE_USER, null, 1 , 0);
+ $share = $this->provider->getSharedWith('sharedWith', IShare::TYPE_USER, null, 1, 0);
$this->assertCount(1, $share);
$share = $share[0];
@@ -1023,7 +1023,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
$this->rootFolder->method('getUserFolder')->with('shareOwner')->willReturnSelf();
$this->rootFolder->method('getById')->with($fileId)->willReturn([$file]);
- $share = $this->provider->getSharedWith('sharedWith', IShare::TYPE_GROUP, null, 20 , 1);
+ $share = $this->provider->getSharedWith('sharedWith', IShare::TYPE_GROUP, null, 20, 1);
$this->assertCount(1, $share);
$share = $share[0];
@@ -1267,7 +1267,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
]);
$this->groupManager->method('getUserGroupIds')->with($user)->willReturn($groups);
- $share = $this->provider->getSharedWith('sharedWith', $shareType, null, 1 , 0);
+ $share = $this->provider->getSharedWith('sharedWith', $shareType, null, 1, 0);
$this->assertCount(0, $share);
}
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index f1a53200f5f..93f33fe30b9 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -481,7 +481,7 @@ class ManagerTest extends \Test\TestCase {
->getMock();
$date = new \DateTime();
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($date)
@@ -594,30 +594,30 @@ class ManagerTest extends \Test\TestCase {
->willReturn($storage);
$data = [
- [$this->createShare(null, IShare::TYPE_USER, $file, null, $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
- [$this->createShare(null, IShare::TYPE_USER, $file, $group0, $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
- [$this->createShare(null, IShare::TYPE_USER, $file, 'foo@bar.com', $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
+ [$this->createShare(null, IShare::TYPE_USER, $file, null, $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
+ [$this->createShare(null, IShare::TYPE_USER, $file, $group0, $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
+ [$this->createShare(null, IShare::TYPE_USER, $file, 'foo@bar.com', $user0, $user0, 31, null, null), 'SharedWith is not a valid user', true],
[$this->createShare(null, IShare::TYPE_GROUP, $file, null, $user0, $user0, 31, null, null), 'SharedWith is not a valid group', true],
[$this->createShare(null, IShare::TYPE_GROUP, $file, $user2, $user0, $user0, 31, null, null), 'SharedWith is not a valid group', true],
[$this->createShare(null, IShare::TYPE_GROUP, $file, 'foo@bar.com', $user0, $user0, 31, null, null), 'SharedWith is not a valid group', true],
- [$this->createShare(null, IShare::TYPE_LINK, $file, $user2, $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
- [$this->createShare(null, IShare::TYPE_LINK, $file, $group0, $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
- [$this->createShare(null, IShare::TYPE_LINK, $file, 'foo@bar.com', $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
+ [$this->createShare(null, IShare::TYPE_LINK, $file, $user2, $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
+ [$this->createShare(null, IShare::TYPE_LINK, $file, $group0, $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
+ [$this->createShare(null, IShare::TYPE_LINK, $file, 'foo@bar.com', $user0, $user0, 31, null, null), 'SharedWith should be empty', true],
[$this->createShare(null, -1, $file, null, $user0, $user0, 31, null, null), 'unknown share type', true],
- [$this->createShare(null, IShare::TYPE_USER, $file, $user2, null, $user0, 31, null, null), 'SharedBy should be set', true],
+ [$this->createShare(null, IShare::TYPE_USER, $file, $user2, null, $user0, 31, null, null), 'SharedBy should be set', true],
[$this->createShare(null, IShare::TYPE_GROUP, $file, $group0, null, $user0, 31, null, null), 'SharedBy should be set', true],
- [$this->createShare(null, IShare::TYPE_LINK, $file, null, null, $user0, 31, null, null), 'SharedBy should be set', true],
+ [$this->createShare(null, IShare::TYPE_LINK, $file, null, null, $user0, 31, null, null), 'SharedBy should be set', true],
- [$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Cannot share with yourself', true],
+ [$this->createShare(null, IShare::TYPE_USER, $file, $user0, $user0, $user0, 31, null, null), 'Cannot share with yourself', true],
- [$this->createShare(null, IShare::TYPE_USER, null, $user2, $user0, $user0, 31, null, null), 'Path should be set', true],
+ [$this->createShare(null, IShare::TYPE_USER, null, $user2, $user0, $user0, 31, null, null), 'Path should be set', true],
[$this->createShare(null, IShare::TYPE_GROUP, null, $group0, $user0, $user0, 31, null, null), 'Path should be set', true],
- [$this->createShare(null, IShare::TYPE_LINK, null, null, $user0, $user0, 31, null, null), 'Path should be set', true],
+ [$this->createShare(null, IShare::TYPE_LINK, null, null, $user0, $user0, 31, null, null), 'Path should be set', true],
- [$this->createShare(null, IShare::TYPE_USER, $node, $user2, $user0, $user0, 31, null, null), 'Path should be either a file or a folder', true],
+ [$this->createShare(null, IShare::TYPE_USER, $node, $user2, $user0, $user0, 31, null, null), 'Path should be either a file or a folder', true],
[$this->createShare(null, IShare::TYPE_GROUP, $node, $group0, $user0, $user0, 31, null, null), 'Path should be either a file or a folder', true],
- [$this->createShare(null, IShare::TYPE_LINK, $node, null, $user0, $user0, 31, null, null), 'Path should be either a file or a folder', true],
+ [$this->createShare(null, IShare::TYPE_LINK, $node, null, $user0, $user0, 31, null, null), 'Path should be either a file or a folder', true],
];
$nonShareAble = $this->createMock(Folder::class);
@@ -629,9 +629,9 @@ class ManagerTest extends \Test\TestCase {
$nonShareAble->method('getStorage')
->willReturn($storage);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonShareAble, $user2, $user0, $user0, 31, null, null), 'You are not allowed to share name', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonShareAble, $user2, $user0, $user0, 31, null, null), 'You are not allowed to share name', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonShareAble, $group0, $user0, $user0, 31, null, null), 'You are not allowed to share name', true];
- $data[] = [$this->createShare(null, IShare::TYPE_LINK, $nonShareAble, null, $user0, $user0, 31, null, null), 'You are not allowed to share name', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_LINK, $nonShareAble, null, $user0, $user0, 31, null, null), 'You are not allowed to share name', true];
$limitedPermssions = $this->createMock(File::class);
$limitedPermssions->method('isShareable')->willReturn(true);
@@ -644,17 +644,17 @@ class ManagerTest extends \Test\TestCase {
$limitedPermssions->method('getStorage')
->willReturn($storage);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, null, null, null), 'A share requires permissions', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, null, null, null), 'A share requires permissions', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, null, null, null), 'A share requires permissions', true];
- $data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, null, null, null), 'A share requires permissions', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, null, null, null), 'A share requires permissions', true];
$mount = $this->createMock(MoveableMount::class);
$limitedPermssions->method('getMountPoint')->willReturn($mount);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of path', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $limitedPermssions, $user2, $user0, $user0, 31, null, null), 'Cannot increase permissions of path', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $limitedPermssions, $group0, $user0, $user0, 17, null, null), 'Cannot increase permissions of path', true];
- $data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Cannot increase permissions of path', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_LINK, $limitedPermssions, null, $user0, $user0, 3, null, null), 'Cannot increase permissions of path', true];
$nonMoveableMountPermssions = $this->createMock(Folder::class);
$nonMoveableMountPermssions->method('isShareable')->willReturn(true);
@@ -667,7 +667,7 @@ class ManagerTest extends \Test\TestCase {
$nonMoveableMountPermssions->method('getStorage')
->willReturn($storage);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $nonMoveableMountPermssions, $user2, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $nonMoveableMountPermssions, $group0, $user0, $user0, 11, null, null), 'Cannot increase permissions of path', false];
$rootFolder = $this->createMock(Folder::class);
@@ -675,9 +675,9 @@ class ManagerTest extends \Test\TestCase {
$rootFolder->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_ALL);
$rootFolder->method('getId')->willReturn(42);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You cannot share your root folder', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $rootFolder, $user2, $user0, $user0, 30, null, null), 'You cannot share your root folder', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $rootFolder, $group0, $user0, $user0, 2, null, null), 'You cannot share your root folder', true];
- $data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You cannot share your root folder', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_LINK, $rootFolder, null, $user0, $user0, 16, null, null), 'You cannot share your root folder', true];
$allPermssions = $this->createMock(Folder::class);
$allPermssions->method('isShareable')->willReturn(true);
@@ -688,12 +688,12 @@ class ManagerTest extends \Test\TestCase {
$allPermssions->method('getStorage')
->willReturn($storage);
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $allPermssions, $user2, $user0, $user0, 30, null, null), 'Shares need at least read permissions', true];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $allPermssions, $user2, $user0, $user0, 30, null, null), 'Shares need at least read permissions', true];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $allPermssions, $group0, $user0, $user0, 2, null, null), 'Shares need at least read permissions', true];
- $data[] = [$this->createShare(null, IShare::TYPE_USER, $allPermssions, $user2, $user0, $user0, 31, null, null), null, false];
+ $data[] = [$this->createShare(null, IShare::TYPE_USER, $allPermssions, $user2, $user0, $user0, 31, null, null), null, false];
$data[] = [$this->createShare(null, IShare::TYPE_GROUP, $allPermssions, $group0, $user0, $user0, 3, null, null), null, false];
- $data[] = [$this->createShare(null, IShare::TYPE_LINK, $allPermssions, null, $user0, $user0, 17, null, null), null, false];
+ $data[] = [$this->createShare(null, IShare::TYPE_LINK, $allPermssions, null, $user0, $user0, 17, null, null), null, false];
$remoteStorage = $this->createMock(Storage\IStorage::class);
@@ -889,7 +889,7 @@ class ManagerTest extends \Test\TestCase {
}
$expected = new \DateTime();
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$expected->add(new \DateInterval('P3D'));
self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]);
@@ -924,7 +924,7 @@ class ManagerTest extends \Test\TestCase {
}
$expected = new \DateTime();
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$expected->add(new \DateInterval('P1D'));
self::invokePrivate($this->manager, 'validateExpirationDateInternal', [$share]);
@@ -972,10 +972,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateInternalEnforceValid($shareType) {
$future = new \DateTime();
$future->add(new \DateInterval('P2D'));
- $future->setTime(1,2,3);
+ $future->setTime(1, 2, 3);
$expected = clone $future;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setShareType($shareType);
@@ -1014,10 +1014,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateInternalNoDefault($shareType) {
$date = new \DateTime();
$date->add(new \DateInterval('P5D'));
- $date->setTime(1,2,3);
+ $date->setTime(1, 2, 3);
$expected = clone $date;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setShareType($shareType);
@@ -1062,7 +1062,7 @@ class ManagerTest extends \Test\TestCase {
$expected = new \DateTime();
$expected->add(new \DateInterval('P3D'));
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
if ($shareType === IShare::TYPE_USER) {
$this->config->method('getAppValue')
@@ -1097,10 +1097,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateInternalDefault($shareType) {
$future = new \DateTime();
$future->add(new \DateInterval('P5D'));
- $future->setTime(1,2,3);
+ $future->setTime(1, 2, 3);
$expected = clone $future;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setShareType($shareType);
@@ -1139,7 +1139,7 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateInternalHookModification($shareType) {
$nextWeek = new \DateTime();
$nextWeek->add(new \DateInterval('P7D'));
- $nextWeek->setTime(0,0,0);
+ $nextWeek->setTime(0, 0, 0);
$save = clone $nextWeek;
@@ -1168,7 +1168,7 @@ class ManagerTest extends \Test\TestCase {
$nextWeek = new \DateTime();
$nextWeek->add(new \DateInterval('P7D'));
- $nextWeek->setTime(0,0,0);
+ $nextWeek->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setShareType($shareType);
@@ -1267,7 +1267,7 @@ class ManagerTest extends \Test\TestCase {
]);
$expected = new \DateTime();
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$expected->add(new \DateInterval('P3D'));
self::invokePrivate($this->manager, 'validateExpirationDateLink', [$share]);
@@ -1288,7 +1288,7 @@ class ManagerTest extends \Test\TestCase {
]);
$expected = new \DateTime();
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$expected->add(new \DateInterval('P1D'));
self::invokePrivate($this->manager, 'validateExpirationDateLink', [$share]);
@@ -1320,10 +1320,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateEnforceValid() {
$future = new \DateTime();
$future->add(new \DateInterval('P2D'));
- $future->setTime(1,2,3);
+ $future->setTime(1, 2, 3);
$expected = clone $future;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($future);
@@ -1349,10 +1349,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateNoDefault() {
$date = new \DateTime();
$date->add(new \DateInterval('P5D'));
- $date->setTime(1,2,3);
+ $date->setTime(1, 2, 3);
$expected = clone $date;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($date);
@@ -1388,7 +1388,7 @@ class ManagerTest extends \Test\TestCase {
$expected = new \DateTime();
$expected->add(new \DateInterval('P3D'));
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$this->config->method('getAppValue')
->willReturnMap([
@@ -1411,10 +1411,10 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateDefault() {
$future = new \DateTime();
$future->add(new \DateInterval('P5D'));
- $future->setTime(1,2,3);
+ $future->setTime(1, 2, 3);
$expected = clone $future;
- $expected->setTime(0,0,0);
+ $expected->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($future);
@@ -1440,7 +1440,7 @@ class ManagerTest extends \Test\TestCase {
public function testValidateExpirationDateHookModification() {
$nextWeek = new \DateTime();
$nextWeek->add(new \DateInterval('P7D'));
- $nextWeek->setTime(0,0,0);
+ $nextWeek->setTime(0, 0, 0);
$save = clone $nextWeek;
@@ -1465,7 +1465,7 @@ class ManagerTest extends \Test\TestCase {
$nextWeek = new \DateTime();
$nextWeek->add(new \DateInterval('P7D'));
- $nextWeek->setTime(0,0,0);
+ $nextWeek->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($nextWeek);
@@ -2623,7 +2623,7 @@ class ManagerTest extends \Test\TestCase {
}
$today = new \DateTime();
- $today->setTime(0,0,0);
+ $today->setTime(0, 0, 0);
/*
* Set the expiration date to today for some shares
@@ -2851,7 +2851,7 @@ class ManagerTest extends \Test\TestCase {
->getMock();
$date = new \DateTime();
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
$share = $this->manager->newShare();
$share->setExpirationDate($date);
@@ -2875,7 +2875,7 @@ class ManagerTest extends \Test\TestCase {
->willReturn('yes');
$date = new \DateTime();
- $date->setTime(0,0,0);
+ $date->setTime(0, 0, 0);
$date->add(new \DateInterval('P2D'));
$share = $this->manager->newShare();
$share->setExpirationDate($date);
@@ -3195,7 +3195,7 @@ class ManagerTest extends \Test\TestCase {
->setPermissions(15);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3276,7 +3276,7 @@ class ManagerTest extends \Test\TestCase {
->setPermissions(15);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3342,7 +3342,7 @@ class ManagerTest extends \Test\TestCase {
->setPermissions(\OCP\Constants::PERMISSION_ALL);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3424,7 +3424,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3507,7 +3507,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3598,7 +3598,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3671,7 +3671,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3744,7 +3744,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3817,7 +3817,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(false);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3891,7 +3891,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(true);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
@@ -3965,7 +3965,7 @@ class ManagerTest extends \Test\TestCase {
->setSendPasswordByTalk(true);
$tomorrow = new \DateTime();
- $tomorrow->setTime(0,0,0);
+ $tomorrow->setTime(0, 0, 0);
$tomorrow->add(new \DateInterval('P1D'));
$file = $this->createMock(File::class);
diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php
index ad8b01555ea..aa56959d3cb 100644
--- a/tests/lib/User/UserTest.php
+++ b/tests/lib/User/UserTest.php
@@ -117,7 +117,7 @@ class UserTest extends TestCase {
});
$user = new User('foo', $backend, $this->dispatcher);
- $this->assertTrue($user->setPassword('bar',''));
+ $this->assertTrue($user->setPassword('bar', ''));
}
public function testSetPasswordNotSupported() {
@@ -133,7 +133,7 @@ class UserTest extends TestCase {
->willReturn(false);
$user = new User('foo', $backend, $this->dispatcher);
- $this->assertFalse($user->setPassword('bar',''));
+ $this->assertFalse($user->setPassword('bar', ''));
}
public function testChangeAvatarSupportedYes() {
@@ -389,12 +389,12 @@ class UserTest extends TestCase {
$backend->expects($this->once())
->method('setDisplayName')
- ->with('foo','Foo')
+ ->with('foo', 'Foo')
->willReturn(true);
$user = new User('foo', $backend, $this->dispatcher);
$this->assertTrue($user->setDisplayName('Foo'));
- $this->assertEquals('Foo',$user->getDisplayName());
+ $this->assertEquals('Foo', $user->getDisplayName());
}
/**
@@ -418,7 +418,7 @@ class UserTest extends TestCase {
$user = new User('foo', $backend, $this->dispatcher);
$this->assertFalse($user->setDisplayName(' '));
- $this->assertEquals('foo',$user->getDisplayName());
+ $this->assertEquals('foo', $user->getDisplayName());
}
public function testSetDisplayNameNotSupported() {
@@ -436,7 +436,7 @@ class UserTest extends TestCase {
$user = new User('foo', $backend, $this->dispatcher);
$this->assertFalse($user->setDisplayName('Foo'));
- $this->assertEquals('foo',$user->getDisplayName());
+ $this->assertEquals('foo', $user->getDisplayName());
}
public function testSetPasswordHooks() {
@@ -476,7 +476,7 @@ class UserTest extends TestCase {
$user = new User('foo', $backend, $this->dispatcher, $emitter);
- $user->setPassword('bar','');
+ $user->setPassword('bar', '');
$this->assertEquals(2, $hooksCalled);
}