summaryrefslogtreecommitdiffstats
path: root/tests/Core
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-01-27 14:47:19 +0100
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-02-19 21:03:06 +0100
commit76b5f44f05f3ea9f56707ed0f6c4bff2fa7673e8 (patch)
tree8cf073b7ef13976ee9685a773fa4dbff04550ada /tests/Core
parent03d31926385624abe4b24b98dee93e132049889c (diff)
downloadnextcloud-server-76b5f44f05f3ea9f56707ed0f6c4bff2fa7673e8.tar.gz
nextcloud-server-76b5f44f05f3ea9f56707ed0f6c4bff2fa7673e8.zip
Strict Types, Return Types
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'tests/Core')
-rw-r--r--tests/Core/Command/Apps/AppsDisableTest.php5
-rw-r--r--tests/Core/Command/Apps/AppsEnableTest.php8
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php
index 1e3c4019f52..d9c43a79c26 100644
--- a/tests/Core/Command/Apps/AppsDisableTest.php
+++ b/tests/Core/Command/Apps/AppsDisableTest.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Daniel Kesselberg (mail@danielkesselberg.de)
*
@@ -55,7 +56,7 @@ class AppsDisableTest extends TestCase {
* @param $statusCode
* @param $output
*/
- public function testCommandInput($appId, $statusCode, $output) {
+ public function testCommandInput($appId, $statusCode, $output): void {
$input = ['app-id' => $appId];
$this->commandTester->execute($input);
@@ -64,7 +65,7 @@ class AppsDisableTest extends TestCase {
$this->assertSame($statusCode, $this->commandTester->getStatusCode());
}
- public function dataCommandInput() {
+ public function dataCommandInput(): array {
return [
[['admin_audit'], 0, 'admin_audit disabled'],
[['comments'], 0, 'comments disabled'],
diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php
index e1192d5124d..43f377c70a0 100644
--- a/tests/Core/Command/Apps/AppsEnableTest.php
+++ b/tests/Core/Command/Apps/AppsEnableTest.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Daniel Kesselberg (mail@danielkesselberg.de)
*
@@ -44,6 +45,9 @@ class AppsEnableTest extends TestCase {
);
$this->commandTester = new CommandTester($command);
+
+ \OC::$server->getAppManager()->disableApp('admin_audit');
+ \OC::$server->getAppManager()->disableApp('comments');
}
/**
@@ -53,7 +57,7 @@ class AppsEnableTest extends TestCase {
* @param $statusCode
* @param $output
*/
- public function testCommandInput($appId, $groups, $statusCode, $output) {
+ public function testCommandInput($appId, $groups, $statusCode, $output): void {
$input = ['app-id' => $appId];
if (is_array($groups)) {
@@ -66,7 +70,7 @@ class AppsEnableTest extends TestCase {
$this->assertSame($statusCode, $this->commandTester->getStatusCode());
}
- public function dataCommandInput() {
+ public function dataCommandInput(): array {
return [
[['admin_audit'], null, 0, 'admin_audit enabled'],
[['comments'], null, 0, 'comments enabled'],