mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
adhere PHP CC
This commit is contained in:
parent
db4c9773b2
commit
8e208a0f41
1 changed files with 14 additions and 4 deletions
|
@ -61,12 +61,22 @@ class DatabaseTest extends FixtureTest
|
||||||
|
|
||||||
self::assertEquals('https://friendica.local', $db->selectFirst('gserver', ['url'], ['nurl' => 'http://friendica.local'])['url']);
|
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', ['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(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::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::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']);
|
self::assertEquals(1, $db->selectFirst('gserver', ['registered-users'], ['nurl' => 'http://friendica.local'])['registered-users']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue