Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorkesselb <mail@danielkesselberg.de>2020-04-18 12:36:23 +0300
committerGitHub <noreply@github.com>2020-04-18 12:36:23 +0300
commitefeed3479fd048b403c6a72ebf74241a971a065c (patch)
tree0584747595c844f66977004f5b6ded042874b59d /tests
parent4e8a4f980fb3d144060af59dec9d4c71759b3f7a (diff)
parent3645495d73dd21d125c32a9d598bd56232478c28 (diff)
Merge pull request #201 from nextcloud/enh/conding-standards
Add nextcloud code standards
Diffstat (limited to 'tests')
-rw-r--r--tests/bootstrap.php3
-rw-r--r--tests/lib/DefaultOsTest.php1
-rw-r--r--tests/lib/SessionStatisticsTest.php9
3 files changed, 3 insertions, 10 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index c8d7a7b..6509885 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -6,9 +6,8 @@ if (!defined('PHPUNIT_RUN')) {
require_once __DIR__ . '/../../../lib/base.php';
-if(!class_exists('\PHPUnit\Framework\TestCase')) {
+if (!class_exists('\PHPUnit\Framework\TestCase')) {
require_once('PHPUnit/Autoload.php');
}
\OC_App::loadApp('serverinfo');
OC_Hook::clear();
-
diff --git a/tests/lib/DefaultOsTest.php b/tests/lib/DefaultOsTest.php
index 88329c1..32aa8e1 100644
--- a/tests/lib/DefaultOsTest.php
+++ b/tests/lib/DefaultOsTest.php
@@ -143,5 +143,4 @@ class DefaultOsTest extends TestCase {
$this->assertSame([], $this->os->getDiskInfo());
}
-
}
diff --git a/tests/lib/SessionStatisticsTest.php b/tests/lib/SessionStatisticsTest.php
index bde82e1..96b6beb 100644
--- a/tests/lib/SessionStatisticsTest.php
+++ b/tests/lib/SessionStatisticsTest.php
@@ -22,7 +22,6 @@
namespace OCA\ServerInfo\Tests;
-
use OCA\ServerInfo\SessionStatistics;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\IDBConnection;
@@ -77,7 +76,7 @@ class SessionStatisticsTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->insert($this->table)
->values(
- array(
+ [
'uid' => $query->createNamedParameter('user-' . ($numOfEntries + $i % 2)),
'login_name' => $query->createNamedParameter('user-' . ($numOfEntries + $i % 2)),
'password' => $query->createNamedParameter('password'),
@@ -86,7 +85,7 @@ class SessionStatisticsTest extends TestCase {
'type' => $query->createNamedParameter(0),
'last_activity' => $query->createNamedParameter($lastActivity),
'last_check' => $query->createNamedParameter($lastActivity),
- )
+ ]
);
$query->execute();
}
@@ -103,9 +102,5 @@ class SessionStatisticsTest extends TestCase {
$this->assertSame(2, $result['last5minutes']);
$this->assertSame(4, $result['last1hour']);
$this->assertSame(6, $result['last24hours']);
-
}
-
-
-
}