From: Philipp Date: Sat, 13 May 2023 20:36:18 +0000 (+0200) Subject: adhere PHP CC X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8e208a0f41e779a333d0bc7f90b88c3728f18ea5;p=friendica.git adhere PHP CC --- diff --git a/tests/src/Database/DatabaseTest.php b/tests/src/Database/DatabaseTest.php index 06aee5a929..6943f919db 100644 --- a/tests/src/Database/DatabaseTest.php +++ b/tests/src/Database/DatabaseTest.php @@ -36,7 +36,7 @@ class DatabaseTest extends FixtureTest parent::setUp(); - $this->configCache = new Cache(); + $this->configCache = new Cache(); $this->configFileManager = new ConfigFileManager($this->root->url(), $this->root->url() . '/config/', $this->root->url() . '/static/'); } @@ -61,12 +61,22 @@ class DatabaseTest extends FixtureTest self::assertEquals('https://friendica.local', $db->selectFirst('gserver', ['url'], ['nurl' => 'http://friendica.local'])['url']); self::assertTrue($db->update('gserver', ['active-week-users' => 0], ['nurl' => 'http://friendica.local'])); - self::assertTrue($db->update('gserver', ['site_name' => 'test', "`registered-users` = `registered-users` + 1", 'info' => 'another test', "`active-week-users` = `active-week-users` + 2"], ['nurl' => 'http://friendica.local'])); + self::assertTrue($db->update('gserver', + ['site_name' => 'test', "`registered-users` = `registered-users` + 1", + 'info' => 'another test', + "`active-week-users` = `active-week-users` + 2"], ['nurl' => 'http://friendica.local' + ])); self::assertEquals(1, $db->selectFirst('gserver', ['registered-users'], ['nurl' => 'http://friendica.local'])['registered-users']); self::assertEquals(2, $db->selectFirst('gserver', ['active-week-users'], ['nurl' => 'http://friendica.local'])['active-week-users']); - self::assertTrue($db->update('gserver', ['site_name' => 'test', "`registered-users` = `registered-users` + 1", 'info' => 'another test'], ['nurl' => 'http://friendica.local'])); + self::assertTrue($db->update('gserver', + ['site_name' => 'test', "`registered-users` = `registered-users` + 1", + 'info' => 'another test'], ['nurl' => 'http://friendica.local' + ])); self::assertEquals(2, $db->selectFirst('gserver', ['registered-users'], ['nurl' => 'http://friendica.local'])['registered-users']); - self::assertTrue($db->update('gserver', ['site_name' => 'test', "`registered-users` = `registered-users` - 1", 'info' => 'another test'], ['nurl' => 'http://friendica.local'])); + self::assertTrue($db->update('gserver', + ['site_name' => 'test', "`registered-users` = `registered-users` - 1", + 'info' => 'another test'], ['nurl' => 'http://friendica.local' + ])); self::assertEquals(1, $db->selectFirst('gserver', ['registered-users'], ['nurl' => 'http://friendica.local'])['registered-users']); } }