tidy up acceptance tests
This commit is contained in:
@@ -2941,7 +2941,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a string that can be used to check a url of comments with
|
||||
* returns a string that can be used to check a URL of comments with
|
||||
* regular expression (without delimiter)
|
||||
*
|
||||
* @return string
|
||||
|
||||
@@ -385,7 +385,7 @@ class FilesVersionsContext implements Context {
|
||||
|
||||
/**
|
||||
* returns the result parsed into an SimpleXMLElement
|
||||
* with an registered namespace with 'd' as prefix and 'DAV:' as namespace
|
||||
* with a registered namespace with 'd' as prefix and 'DAV:' as namespace
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileId
|
||||
|
||||
@@ -1373,7 +1373,7 @@ class GraphContext implements Context {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function userRetrievesHisorHerInformationOfUserUsingGraphApi(
|
||||
public function userRetrievesHisOrHerInformationOfUserUsingGraphApi(
|
||||
string $user
|
||||
):void {
|
||||
$response = $this->retrieveUserInformationUsingGraphApi($user);
|
||||
|
||||
@@ -935,7 +935,7 @@ class OCSContext implements Context {
|
||||
if (\is_object($jsonResponse) && $jsonResponse->ocs->meta->statuscode) {
|
||||
return (string) $jsonResponse->ocs->meta->statuscode;
|
||||
}
|
||||
// go to xml response when json response is null (it means not formated and get status code)
|
||||
// go to xml response when json response is null (it means not formatted and get status code)
|
||||
$responseXml = $this->featureContext->getResponseXml($response, __METHOD__);
|
||||
if (isset($responseXml->meta[0], $responseXml->meta[0]->statuscode)) {
|
||||
return (string) $responseXml->meta[0]->statuscode;
|
||||
|
||||
@@ -686,7 +686,7 @@ trait Provisioning {
|
||||
$userId = \str_replace('+', '\+', $setting["userid"]);
|
||||
$newDN = 'uid=' . $userId . ',ou=' . $ou . ',' . $this->ldapBaseDN;
|
||||
|
||||
//pick a high number as uidnumber to make sure there are no conflicts with existing uidnumbers
|
||||
//pick a high uidnumber to make sure there are no conflicts with existing uidnumbers
|
||||
$uidNumber = \count($this->ldapCreatedUsers) + 30000;
|
||||
$entry = [];
|
||||
$entry['cn'] = $userId;
|
||||
@@ -936,7 +936,7 @@ trait Provisioning {
|
||||
$body,
|
||||
);
|
||||
} else {
|
||||
// Create a OCS request for creating the user. The request is not sent to the server yet.
|
||||
// Create an OCS request for creating the user. The request is not sent to the server yet.
|
||||
$request = OcsApiHelper::createOcsRequest(
|
||||
$this->getBaseUrl(),
|
||||
'POST',
|
||||
|
||||
@@ -38,7 +38,7 @@ class RoleAssignmentContext implements Context {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private string $setttingsUrl = '/api/v0/settings/';
|
||||
private string $settingsUrl = '/api/v0/settings/';
|
||||
|
||||
/**
|
||||
* This will run before EVERY scenario.
|
||||
@@ -70,7 +70,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getAllExistingRoles(string $user): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "roles-list";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "roles-list";
|
||||
$this->featureContext->setResponse(
|
||||
$this->spacesContext->sendPostRequestToUrl($fullUrl, $user, $this->featureContext->getPasswordForUser($user), "{}")
|
||||
);
|
||||
@@ -87,7 +87,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function sendRequestToAssignRoleToUser(string $user, string $userId, string $roleId): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "assignments-add";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "assignments-add";
|
||||
$body = json_encode(["account_uuid" => $userId, "role_id" => $roleId], JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->featureContext->setResponse(
|
||||
@@ -105,7 +105,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function sendRequestAssignmentsList(string $user, string $userId): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "assignments-list";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "assignments-list";
|
||||
$body = json_encode(["account_uuid" => $userId], JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->featureContext->setResponse(
|
||||
|
||||
@@ -331,7 +331,7 @@ trait Sharing {
|
||||
/**
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
* TableNode $body should not have any heading and can have following rows |
|
||||
* TableNode $body should not have any heading and can have the following rows |
|
||||
* | path | The folder or file path to be shared |
|
||||
* | name | A (human-readable) name for the share, |
|
||||
* | | which can be up to 64 characters in length. |
|
||||
@@ -355,7 +355,7 @@ trait Sharing {
|
||||
* | | (default: 31, for public shares: 1) |
|
||||
* | | Pass either the (total) number, |
|
||||
* | | or the keyword, |
|
||||
* | | or an comma separated list of keywords |
|
||||
* | | or a comma separated list of keywords |
|
||||
* | shareWith | The user or group id with which the file should |
|
||||
* | | be shared. |
|
||||
* | shareType | The type of the share. This can be one of: |
|
||||
@@ -3133,7 +3133,7 @@ trait Sharing {
|
||||
* Returns shares of a file or folder as a SimpleXMLElement
|
||||
*
|
||||
* Note: the "single" SimpleXMLElement may contain one or more actual
|
||||
* shares (to users, groups or public links etc). If you access an item directly,
|
||||
* shares (to users, groups or public links etc.). If you access an item directly,
|
||||
* for example, getShares()->id, then the value of "id" for the first element
|
||||
* will be returned. To access all the elements, you can loop through the
|
||||
* returned SimpleXMLElement with "foreach" - it will act like a PHP array
|
||||
|
||||
@@ -1066,7 +1066,7 @@ class SpacesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function usershouldNotHaveSpace(
|
||||
public function userShouldNotHaveSpace(
|
||||
string $user,
|
||||
string $spaceName
|
||||
): void {
|
||||
@@ -1803,7 +1803,7 @@ class SpacesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a url for destination with spacename
|
||||
* returns a URL for destination with spacename
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileDestination
|
||||
|
||||
@@ -178,7 +178,7 @@ class SpacesTUSContext implements Context {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $spaceName
|
||||
*
|
||||
* @return void
|
||||
|
||||
@@ -288,7 +288,7 @@ class TUSContext implements Context {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
|
||||
@@ -2315,7 +2315,7 @@ trait WebDav {
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the chunking version from human readable format
|
||||
* sets the chunking version from human-readable format
|
||||
*
|
||||
* @param string $version (no|v1|v2|new|old)
|
||||
*
|
||||
@@ -3044,7 +3044,7 @@ trait WebDav {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
|
||||
@@ -836,7 +836,7 @@ class WebDavPropertiesContext implements Context {
|
||||
// expected href should be like: "remote.php/webdav/strängé folder/file.txt"
|
||||
$explodeDecoded = \explode('/', $decodedValue);
|
||||
// get the first item of the expected href.
|
||||
// i.e remote.php from "remote.php/webdav/strängé folder/file.txt"
|
||||
// i.e. remote.php from "remote.php/webdav/strängé folder/file.txt"
|
||||
// or dav from "dav/spaces/%spaceid%/C++ file.cpp"
|
||||
$explodeExpected = \explode('/', $expectedHref);
|
||||
$remotePhpIndex = \array_search($explodeExpected[0], $explodeDecoded);
|
||||
|
||||
Reference in New Issue
Block a user