Merge pull request #328 from opencloud-eu/fixGherkinLintAndPhpStandart

Fix gherkin lint
This commit is contained in:
Viktor Scharf
2025-03-10 15:58:04 +01:00
committed by GitHub
9 changed files with 10 additions and 8 deletions

View File

@@ -33,6 +33,7 @@ class UploadHelper extends Assert {
/**
*
* @param string|null $baseUrl URL of OpenCloud
* @param string|null $user
* @param string|null $password
* @param string|null $source
* @param string|null $destination

View File

@@ -750,7 +750,9 @@ class FeatureContext extends BehatVariablesContext {
*/
public function getStorageUsersRoot(): string {
$ocDataPath = getenv("OC_BASE_DATA_PATH") ? getenv("OC_BASE_DATA_PATH") : getenv("HOME") . '/.opencloud';
return getenv("STORAGE_USERS_DECOMPOSED_ROOT") ? getenv("STORAGE_USERS_DECOMPOSED_ROOT") : $ocDataPath . "/storage/users";
return getenv("STORAGE_USERS_DECOMPOSED_ROOT")
? getenv("STORAGE_USERS_DECOMPOSED_ROOT")
: $ocDataPath . "/storage/users";
}
/**

View File

@@ -192,7 +192,7 @@ class OCSContext implements Context {
)
);
}
/**
* @Then /^the OCS status code should be "([^"]*)"$/
*

View File

@@ -159,7 +159,7 @@ class OcConfigContext implements Context {
} else {
$path = \realpath(\dirname(__FILE__) . "/../../" . $path);
}
$response = OcConfigHelper::reConfigureOc(
[
$configVariable => $path

View File

@@ -182,10 +182,10 @@ class SearchContext implements Context {
$property['value'],
$user
);
if (is_object($fileResult)) {
if (\is_object($fileResult)) {
$fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']);
} else {
throw new Exception("Expected fileResult to be an object, but found " . gettype($fileResult));
throw new Exception("Expected fileResult to be an object, but found " . \gettype($fileResult));
}
if ($fileResultProperty) {
Assert::assertMatchesRegularExpression(

View File

@@ -37,7 +37,6 @@ class ShareesContext implements Context {
private FeatureContext $featureContext;
private OCSContext $ocsContext;
/**
* @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/
*

View File

@@ -1654,7 +1654,6 @@ trait Sharing {
$this->setResponse($this->getAllShares($user, "?path=$path"));
}
/**
* @Then /^the last share_id should be included in the response/
*

View File

@@ -6,6 +6,7 @@ Feature: get applications
Background:
Given user "Alice" has been created with default attributes
Scenario Outline: admin user lists all the groups
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" gets all applications using the Graph API

View File

@@ -146,7 +146,7 @@ Feature: Email notification
Zum Ansehen hier klicken: %base_url%/files/shares/with-me
"""
@issue-183
@issue-183
Scenario: group members get an email notification in their respective languages when someone shares a space with the group
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Carol" has been created with default attributes