From 2574cbfa619bc8650e865f6fda064cd22c6b2d0e Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 28 Aug 2024 10:44:18 +0200 Subject: chore: Apply php:cs recommendations Signed-off-by: Louis Chemineau --- .../lib/DB/QueryBuilder/Partitioned/JoinConditionTest.php | 2 +- .../lib/DB/QueryBuilder/Sharded/SharedQueryBuilderTest.php | 4 ++-- tests/lib/Files/Cache/CacheTest.php | 14 +++++++------- tests/lib/Preview/BackgroundCleanupJobTest.php | 4 ++-- tests/preseed-config.php | 12 ++++++------ 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'tests') 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, ], ] ] -- cgit v1.2.3