mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Strict Types, Return Types
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
03d3192638
commit
76b5f44f05
4 changed files with 13 additions and 12 deletions
|
|
@ -562,7 +562,6 @@ pipeline:
|
|||
image: nextcloudci/integration-php7.1:1
|
||||
commands:
|
||||
- ./occ maintenance:install --admin-pass=admin --data-dir=/dev/shm/nc_int
|
||||
- ./occ app:enable user_ldap
|
||||
- cd build/integration
|
||||
- ./run.sh ldap_features/ldap-ocs.feature
|
||||
when:
|
||||
|
|
@ -577,7 +576,6 @@ pipeline:
|
|||
- ./occ config:system:set redis timeout --value=0 --type=integer
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed
|
||||
- ./occ app:enable user_ldap
|
||||
- cd build/integration
|
||||
- ./run.sh ldap_features/ldap-openldap.feature
|
||||
when:
|
||||
|
|
@ -592,7 +590,6 @@ pipeline:
|
|||
- ./occ config:system:set redis timeout --value=0 --type=integer
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed
|
||||
- ./occ app:enable user_ldap
|
||||
- cd build/integration
|
||||
- ./run.sh ldap_features/openldap-uid-username.feature
|
||||
when:
|
||||
|
|
@ -607,7 +604,6 @@ pipeline:
|
|||
- ./occ config:system:set redis timeout --value=0 --type=integer
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.local
|
||||
- ./occ config:system:set --type string --value "\\OC\\Memcache\\Redis" memcache.distributed
|
||||
- ./occ app:enable user_ldap
|
||||
- cd build/integration
|
||||
- ./run.sh ldap_features/openldap-numerical-id.feature
|
||||
when:
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@ export TEST_SERVER_FED_URL="http://localhost:$PORT_FED/ocs/"
|
|||
if [ "$INSTALLED" == "true" ]; then
|
||||
|
||||
#Enable external storage app
|
||||
$OCC app:enable files_external
|
||||
$OCC app:enable user_ldap
|
||||
$OCC app:install --keep-disabled files_external
|
||||
$OCC app:install --keep-disabled user_ldap
|
||||
$OCC app:enable files_external user_ldap
|
||||
|
||||
mkdir -p work/local_storage
|
||||
OUTPUT_CREATE_STORAGE=`$OCC files_external:create local_storage local null::null -c datadir=$PWD/work/local_storage`
|
||||
|
|
@ -71,8 +72,7 @@ if [ "$INSTALLED" == "true" ]; then
|
|||
$OCC files_external:delete -y $ID_STORAGE
|
||||
|
||||
#Disable external storage app
|
||||
$OCC app:disable files_external
|
||||
$OCC app:disable user_ldap
|
||||
$OCC app:disable files_external user_ldap
|
||||
fi
|
||||
|
||||
if [ -z $HIDE_OC_LOGS ]; then
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue