diff options
author | Louis Chemineau <louis@chmn.me> | 2024-08-28 10:44:18 +0200 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2024-08-28 10:44:18 +0200 |
commit | 2574cbfa619bc8650e865f6fda064cd22c6b2d0e (patch) | |
tree | a14ce0f2303e7e309225a403c8cfeb9b753ce124 /tests | |
parent | 9d0248545d85d6a680f2c9507f1bcfe13e889535 (diff) | |
download | nextcloud-server-2574cbfa619bc8650e865f6fda064cd22c6b2d0e.tar.gz nextcloud-server-2574cbfa619bc8650e865f6fda064cd22c6b2d0e.zip |
chore: Apply php:cs recommendations
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php | 2 | ||||
-rw-r--r-- | tests/lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php | 4 | ||||
-rw-r--r-- | tests/lib/Files/Cache/CacheTest.php | 14 | ||||
-rw-r--r-- | tests/lib/Preview/BackgroundCleanupJobTest.php | 4 | ||||
-rw-r--r-- | tests/preseed-config.php | 12 |
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 9f6d7080757..b90b67a6589 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, ], ] ] |