aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-08-28 10:44:18 +0200
committerLouis <louis@chmn.me>2024-08-28 14:54:14 +0200
commite5a8f996bde57c2245432bee22f966b522469f4d (patch)
treec626fdcf55cc42d6bb1e5edb71d4a885283c7005 /tests
parente2bff39f736fabe8e150f1593ed2ea2c6cc2ea6b (diff)
downloadnextcloud-server-e5a8f996bde57c2245432bee22f966b522469f4d.tar.gz
nextcloud-server-e5a8f996bde57c2245432bee22f966b522469f4d.zip
chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me> [skip ci]
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php2
-rw-r--r--tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php4
-rw-r--r--tests/lib/Files/Cache/CacheTest.php14
-rw-r--r--tests/lib/Preview/BackgroundCleanupJobTest.php4
-rw-r--r--tests/preseed-config.php12
5 files changed, 18 insertions, 18 deletions
diff --git a/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php b/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php
index 56a8e5783aa..a8ebf11c2c2 100644
--- a/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php
+++ b/tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php
@@ -47,7 +47,7 @@ class JoinConditionTest extends TestCase {
public function testParseCondition(string $platform): void {
$query = $this->getBuilder($platform);
$param1 = $query->createNamedParameter('files');
- $param2 = $query->createNamedParameter("test");
+ $param2 = $query->createNamedParameter('test');
$condition = $query->expr()->andX(
$query->expr()->eq('tagmap.categoryid', 'tag.id'),
$query->expr()->eq('tag.type', $param1),
diff --git a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
index 83261729e5e..7af93bbbe59 100644
--- a/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
+++ b/tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php
@@ -91,7 +91,7 @@ class SharedQueryBuilderTest extends TestCase {
$this->expectException(InvalidShardedQueryException::class);
$query->validate();
- $this->fail("exception expected");
+ $this->fail('exception expected');
}
public function testValidateNonSharedTable() {
@@ -114,7 +114,7 @@ class SharedQueryBuilderTest extends TestCase {
$query->expr()->eq('storage', $query->createNamedParameter(10, IQueryBuilder::PARAM_INT)),
$query->expr()->andX(
$query->expr()->eq('storage', $query->createNamedParameter(11, IQueryBuilder::PARAM_INT)),
- $query->expr()->like('path', $query->createNamedParameter("foo/%"))
+ $query->expr()->like('path', $query->createNamedParameter('foo/%'))
)
)
));
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 4afc1a0d8c9..12955f662cc 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -487,17 +487,17 @@ class CacheTest extends \Test\TestCase {
$data = ['size' => 100, 'mtime' => 50, 'mimetype' => 'foo/bar'];
$folderData = ['size' => 100, 'mtime' => 50, 'mimetype' => 'httpd/unix-directory'];
- $this->cache2->put("folder", $folderData);
- $this->cache2->put("folder/sub", $data);
+ $this->cache2->put('folder', $folderData);
+ $this->cache2->put('folder/sub', $data);
- $this->cache->moveFromCache($this->cache2, "folder", "targetfolder");
+ $this->cache->moveFromCache($this->cache2, 'folder', 'targetfolder');
- $this->assertFalse($this->cache2->inCache("folder"));
- $this->assertFalse($this->cache2->inCache("folder/sub"));
+ $this->assertFalse($this->cache2->inCache('folder'));
+ $this->assertFalse($this->cache2->inCache('folder/sub'));
- $this->assertTrue($this->cache->inCache("targetfolder"));
- $this->assertTrue($this->cache->inCache("targetfolder/sub"));
+ $this->assertTrue($this->cache->inCache('targetfolder'));
+ $this->assertTrue($this->cache->inCache('targetfolder/sub'));
}
public function testGetIncomplete() {
diff --git a/tests/lib/Preview/BackgroundCleanupJobTest.php b/tests/lib/Preview/BackgroundCleanupJobTest.php
index ccd5dba69cf..82f19797728 100644
--- a/tests/lib/Preview/BackgroundCleanupJobTest.php
+++ b/tests/lib/Preview/BackgroundCleanupJobTest.php
@@ -147,7 +147,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
public function testCleanupAjax() {
if ($this->connection->getShardDefinition('filecache')) {
- $this->markTestSkipped("ajax cron is not supported for sharded setups");
+ $this->markTestSkipped('ajax cron is not supported for sharded setups');
return;
}
$files = $this->setup11Previews();
@@ -179,7 +179,7 @@ class BackgroundCleanupJobTest extends \Test\TestCase {
public function testOldPreviews() {
if ($this->connection->getShardDefinition('filecache')) {
- $this->markTestSkipped("old previews are not supported for sharded setups");
+ $this->markTestSkipped('old previews are not supported for sharded setups');
return;
}
$appdata = \OC::$server->getAppDataDir('preview');
diff --git a/tests/preseed-config.php b/tests/preseed-config.php
index 7c341278027..f9c15939469 100644
--- a/tests/preseed-config.php
+++ b/tests/preseed-config.php
@@ -81,19 +81,19 @@ if (getenv('OBJECT_STORE') === 's3') {
if (getenv('SHARDING') == '1') {
$CONFIG['dbsharding'] = [
- "filecache" => [
- "shards" => [
+ 'filecache' => [
+ 'shards' => [
[
- "port" => 5001,
+ 'port' => 5001,
],
[
- "port" => 5002,
+ 'port' => 5002,
],
[
- "port" => 5003,
+ 'port' => 5003,
],
[
- "port" => 5004,
+ 'port' => 5004,
],
]
]