1
0
mirror of https://github.com/owncloud/ocis.git synced 2025-04-18 23:44:07 +03:00

test: remove xRequestId parameter

This commit is contained in:
pradip 2025-04-07 16:55:33 +05:45
parent 1ba41ffab3
commit eb3b98090e
No known key found for this signature in database
GPG Key ID: D3F59C1DC379301C
42 changed files with 117 additions and 769 deletions

View File

@ -50,7 +50,6 @@ class AuthAppHelper {
$url = $baseUrl . self::getAuthAppEndpoint();
return HttpRequestHelper::sendRequest(
$url,
null,
"GET",
$user,
$password,
@ -75,7 +74,6 @@ class AuthAppHelper {
. http_build_query($params);
return HttpRequestHelper::sendRequest(
$url,
null,
"POST",
$user,
$password,
@ -99,7 +97,6 @@ class AuthAppHelper {
$url = $baseUrl . self::getAuthAppEndpoint() . "?token=$token";
return HttpRequestHelper::sendRequest(
$url,
null,
"DELETE",
$user,
$password,

View File

@ -35,7 +35,6 @@ class CollaborationHelper {
* @param string $username
* @param string $password
* @param string $baseUrl
* @param string $xRequestId
* @param string|null $viewMode
*
* @return ResponseInterface
@ -47,7 +46,6 @@ class CollaborationHelper {
string $username,
string $password,
string $baseUrl,
string $xRequestId,
?string $viewMode = null,
): ResponseInterface {
$url = $baseUrl . "/app/open?app_name=$app&file_id=$fileId";
@ -57,7 +55,6 @@ class CollaborationHelper {
return HttpRequestHelper::post(
$url,
$xRequestId,
$username,
$password,
['Content-Type' => 'application/json']
@ -66,7 +63,6 @@ class CollaborationHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $parentContainerId
@ -78,7 +74,6 @@ class CollaborationHelper {
*/
public static function createFile(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $parentContainerId,
@ -88,7 +83,6 @@ class CollaborationHelper {
$url = $baseUrl . "/app/new?parent_container_id=$parentContainerId&filename=$file";
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
$headers

View File

@ -64,17 +64,12 @@ class EmailHelper {
/**
* list all email
*
* @param string|null $xRequestId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function listAllEmails(
?string $xRequestId,
): ResponseInterface {
public static function listAllEmails(): ResponseInterface {
return HttpRequestHelper::get(
self::getEmailAPIUrl("messages"),
$xRequestId,
null,
null,
['Content-Type' => 'application/json']
@ -84,7 +79,6 @@ class EmailHelper {
/**
* @param string $id when $id set to 'latest' returns the latest message.
* @param string $query
* @param string|null $xRequestId
*
* @return ResponseInterface
* @throws GuzzleException
@ -92,11 +86,9 @@ class EmailHelper {
public static function getEmailById(
string $id,
string $query,
?string $xRequestId,
): ResponseInterface {
return HttpRequestHelper::get(
self::getEmailAPIUrl("message/$id") . "?query=$query",
$xRequestId,
null,
null,
['Content-Type' => 'application/json']
@ -107,19 +99,16 @@ class EmailHelper {
* search email
*
* @param string $query
* @param string|null $xRequestId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function searchEmails(
string $query,
?string $xRequestId,
): ResponseInterface {
$url = self::getEmailAPIUrl("search") . "?query=$query";
return HttpRequestHelper::get(
$url,
$xRequestId,
null,
null,
['Content-Type' => 'application/json']
@ -129,17 +118,12 @@ class EmailHelper {
/**
* Deletes all email
*
* @param string|null $xRequestId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function deleteAllEmails(
?string $xRequestId,
): ResponseInterface {
public static function deleteAllEmails(): ResponseInterface {
return HttpRequestHelper::delete(
self::getEmailAPIUrl("messages"),
$xRequestId,
null,
null,
['Content-Type' => 'application/json']

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,33 @@ class HttpRequestHelper {
public const HTTP_TOO_EARLY = 425;
public const HTTP_CONFLICT = 409;
/**
* Stores the current scenario reference to use as X-Request-ID
*
* @var string
*/
private static string $currentScenarioRef = '';
/**
* Set the current scenario reference
*
* @param string $scenarioRef
*
* @return void
*/
public static function setCurrentScenarioRef(string $scenarioRef): void {
self::$currentScenarioRef = $scenarioRef;
}
/**
* Get the current scenario reference
*
* @return string
*/
public static function getCurrentScenarioRef(): string {
return self::$currentScenarioRef;
}
/**
* Some systems-under-test do async post-processing of operations like upload,
* move, etc. If a client does a request on the resource before the post-processing
@ -64,7 +91,6 @@ class HttpRequestHelper {
/**
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $method
* @param string|null $user
* @param string|null $password
@ -82,7 +108,6 @@ class HttpRequestHelper {
*/
public static function sendRequestOnce(
?string $url,
?string $xRequestId,
?string $method = 'GET',
?string $user = null,
?string $password = null,
@ -126,7 +151,6 @@ class HttpRequestHelper {
$request = self::createRequest(
$url,
$xRequestId,
$method,
$headers,
$body
@ -164,7 +188,6 @@ class HttpRequestHelper {
/**
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $method
* @param string|null $user
* @param string|null $password
@ -184,7 +207,6 @@ class HttpRequestHelper {
*/
public static function sendRequest(
?string $url,
?string $xRequestId,
?string $method = 'GET',
?string $user = null,
?string $password = null,
@ -209,7 +231,6 @@ class HttpRequestHelper {
do {
$response = self::sendRequestOnce(
$url,
$xRequestId,
$method,
$user,
$password,
@ -383,7 +404,6 @@ class HttpRequestHelper {
* This enables us to create multiple requests in advance so that we can send them to the server at once in parallel.
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $method
* @param array|null $headers ['X-MyHeader' => 'value']
* @param string|array $body either the actual string to send in the body,
@ -394,7 +414,6 @@ class HttpRequestHelper {
*/
public static function createRequest(
?string $url,
?string $xRequestId = '',
?string $method = 'GET',
?array $headers = null,
$body = null
@ -402,9 +421,7 @@ class HttpRequestHelper {
if ($headers === null) {
$headers = [];
}
if ($xRequestId !== '') {
$headers['X-Request-ID'] = $xRequestId;
}
$headers['X-Request-ID'] = self::$currentScenarioRef;
if (\is_array($body)) {
// When creating the client, it is possible to set 'form_params' and
// the Client constructor sorts out doing this http_build_query stuff.
@ -428,7 +445,6 @@ class HttpRequestHelper {
* same as HttpRequestHelper::sendRequest() but with "GET" as method
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $user
* @param string|null $password
* @param array|null $headers ['X-MyHeader' => 'value']
@ -443,7 +459,6 @@ class HttpRequestHelper {
*/
public static function get(
?string $url,
?string $xRequestId,
?string $user = null,
?string $password = null,
?array $headers = null,
@ -454,7 +469,6 @@ class HttpRequestHelper {
): ResponseInterface {
return self::sendRequest(
$url,
$xRequestId,
'GET',
$user,
$password,
@ -470,7 +484,6 @@ class HttpRequestHelper {
* same as HttpRequestHelper::sendRequest() but with "POST" as method
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $user
* @param string|null $password
* @param array|null $headers ['X-MyHeader' => 'value']
@ -485,7 +498,6 @@ class HttpRequestHelper {
*/
public static function post(
?string $url,
?string $xRequestId,
?string $user = null,
?string $password = null,
?array $headers = null,
@ -496,7 +508,6 @@ class HttpRequestHelper {
): ResponseInterface {
return self::sendRequest(
$url,
$xRequestId,
'POST',
$user,
$password,
@ -512,7 +523,6 @@ class HttpRequestHelper {
* same as HttpRequestHelper::sendRequest() but with "PUT" as method
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $user
* @param string|null $password
* @param array|null $headers ['X-MyHeader' => 'value']
@ -527,7 +537,6 @@ class HttpRequestHelper {
*/
public static function put(
?string $url,
?string $xRequestId,
?string $user = null,
?string $password = null,
?array $headers = null,
@ -538,7 +547,6 @@ class HttpRequestHelper {
): ResponseInterface {
return self::sendRequest(
$url,
$xRequestId,
'PUT',
$user,
$password,
@ -554,7 +562,6 @@ class HttpRequestHelper {
* same as HttpRequestHelper::sendRequest() but with "DELETE" as method
*
* @param string|null $url
* @param string|null $xRequestId
* @param string|null $user
* @param string|null $password
* @param array|null $headers ['X-MyHeader' => 'value']
@ -570,7 +577,6 @@ class HttpRequestHelper {
*/
public static function delete(
?string $url,
?string $xRequestId,
?string $user = null,
?string $password = null,
?array $headers = null,
@ -581,7 +587,6 @@ class HttpRequestHelper {
): ResponseInterface {
return self::sendRequest(
$url,
$xRequestId,
'DELETE',
$user,
$password,

View File

@ -297,7 +297,6 @@ class OcisHelper {
* @param string|null $baseUrl
* @param string|null $user
* @param string|null $password
* @param string|null $xRequestId
*
* @return void
* @throws GuzzleException
@ -305,12 +304,10 @@ class OcisHelper {
public static function createEOSStorageHome(
?string $baseUrl,
?string $user,
?string $password,
?string $xRequestId = ''
?string $password
): void {
HttpRequestHelper::get(
$baseUrl . "/ocs/v2.php/apps/notifications/api/v1/notifications",
$xRequestId,
$user,
$password
);

View File

@ -55,7 +55,6 @@ class OcmHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string|null $email
@ -66,7 +65,6 @@ class OcmHelper {
*/
public static function createInvitation(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
?string $email = null,
@ -79,7 +77,6 @@ class OcmHelper {
$url = self::getFullUrl($baseUrl, 'generate-invite');
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders(),
@ -89,7 +86,6 @@ class OcmHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $token
@ -100,7 +96,6 @@ class OcmHelper {
*/
public static function acceptInvitation(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $token,
@ -113,7 +108,6 @@ class OcmHelper {
$url = self::getFullUrl($baseUrl, 'accept-invite');
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders(),
@ -123,7 +117,6 @@ class OcmHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
*
@ -132,14 +125,12 @@ class OcmHelper {
*/
public static function findAcceptedUsers(
string $baseUrl,
string $xRequestId,
string $user,
string $password
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'find-accepted-users');
return HttpRequestHelper::get(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders()
@ -148,7 +139,6 @@ class OcmHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
*
@ -157,14 +147,12 @@ class OcmHelper {
*/
public static function listInvite(
string $baseUrl,
string $xRequestId,
string $user,
string $password
): ResponseInterface {
$url = self::getFullUrl($baseUrl, 'list-invite');
return HttpRequestHelper::get(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders()
@ -173,7 +161,6 @@ class OcmHelper {
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $userId
@ -184,7 +171,6 @@ class OcmHelper {
*/
public static function deleteConnection(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $userId,
@ -197,7 +183,6 @@ class OcmHelper {
];
return HttpRequestHelper::delete(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders(),

View File

@ -38,7 +38,6 @@ class OcsApiHelper {
* @param string|null $password
* @param string|null $method HTTP Method
* @param string|null $path
* @param string|null $xRequestId
* @param mixed $body array of key, value pairs e.g ['value' => 'yes']
* @param int|null $ocsApiVersion (1|2) default 2
* @param array|null $headers
@ -52,7 +51,6 @@ class OcsApiHelper {
?string $password,
?string $method,
?string $path,
?string $xRequestId = '',
$body = [],
?int $ocsApiVersion = 2,
?array $headers = []
@ -63,7 +61,7 @@ class OcsApiHelper {
}
$fullUrl .= "ocs/v$ocsApiVersion.php" . $path;
$headers['OCS-APIREQUEST'] = true;
return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, $method, $user, $password, $headers, $body);
return HttpRequestHelper::sendRequest($fullUrl, $method, $user, $password, $headers, $body);
}
/**
@ -71,7 +69,6 @@ class OcsApiHelper {
* @param string|null $baseUrl
* @param string|null $method HTTP Method
* @param string|null $path
* @param string|null $xRequestId
* @param mixed $body array of key, value pairs e.g ['value' => 'yes']
* @param int|null $ocsApiVersion (1|2) default 2
* @param array|null $headers
@ -82,7 +79,6 @@ class OcsApiHelper {
?string $baseUrl,
?string $method,
?string $path,
?string $xRequestId = '',
$body = [],
?int $ocsApiVersion = 2,
?array $headers = []
@ -94,7 +90,6 @@ class OcsApiHelper {
$fullUrl .= "ocs/v$ocsApiVersion.php" . $path;
return HttpRequestHelper::createRequest(
$fullUrl,
$xRequestId,
$method,
$headers,
$body

View File

@ -80,7 +80,6 @@ class SettingsHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -92,13 +91,11 @@ class SettingsHelper {
string $baseUrl,
string $user,
string $password,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "bundles-list");
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -111,7 +108,6 @@ class SettingsHelper {
* @param string $user
* @param string $password
* @param string $bundleName
* @param string $xRequestId
*
* @return array
*
@ -122,10 +118,9 @@ class SettingsHelper {
string $baseUrl,
string $user,
string $password,
string $bundleName,
string $xRequestId
string $bundleName
): array {
$response = self::getBundlesList($baseUrl, $user, $password, $xRequestId);
$response = self::getBundlesList($baseUrl, $user, $password);
Assert::assertEquals(201, $response->getStatusCode(), "Failed to get bundles list");
$bundlesList = HttpRequestHelper::getJsonDecodedResponseBodyContent($response);
@ -141,7 +136,6 @@ class SettingsHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -153,13 +147,11 @@ class SettingsHelper {
string $baseUrl,
string $user,
string $password,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "roles-list");
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -173,7 +165,6 @@ class SettingsHelper {
* @param string $password
* @param string $assigneeId
* @param string $roleId
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -187,14 +178,12 @@ class SettingsHelper {
string $password,
string $assigneeId,
string $roleId,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "assignments-add");
$body = json_encode(["account_uuid" => $assigneeId, "role_id" => $roleId], JSON_THROW_ON_ERROR);
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -207,7 +196,6 @@ class SettingsHelper {
* @param string $user
* @param string $password
* @param string $userId
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -220,14 +208,12 @@ class SettingsHelper {
string $user,
string $password,
string $userId,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "assignments-list");
$body = json_encode(["account_uuid" => $userId], JSON_THROW_ON_ERROR);
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -239,7 +225,6 @@ class SettingsHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -251,14 +236,12 @@ class SettingsHelper {
string $baseUrl,
string $user,
string $password,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "values-list");
$body = json_encode(["account_uuid" => "me"], JSON_THROW_ON_ERROR);
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -270,7 +253,6 @@ class SettingsHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
*
* @return bool
*
@ -280,10 +262,9 @@ class SettingsHelper {
public static function getAutoAcceptSharesSettingValue(
string $baseUrl,
string $user,
string $password,
string $xRequestId
string $password
): bool {
$response = self::getValuesList($baseUrl, $user, $password, $xRequestId);
$response = self::getValuesList($baseUrl, $user, $password);
Assert::assertEquals(201, $response->getStatusCode(), "Failed to get values list");
$valuesList = HttpRequestHelper::getJsonDecodedResponseBodyContent($response);
@ -305,7 +286,6 @@ class SettingsHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
*
* @return string
*
@ -316,14 +296,12 @@ class SettingsHelper {
string $baseUrl,
string $user,
string $password,
string $xRequestId
): string {
$response = self::getValuesBySettingID(
$baseUrl,
self::PROFILE_LANGUAGE_ID,
$user,
$password,
$xRequestId
$password
);
Assert::assertEquals(201, $response->getStatusCode(), "Failed to get values list");
@ -345,7 +323,6 @@ class SettingsHelper {
* @param string $user
* @param string $password
* @param string $body
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -358,13 +335,11 @@ class SettingsHelper {
string $user,
string $password,
string $body,
string $xRequestId,
array $headers = []
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "values-save");
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,
@ -377,7 +352,6 @@ class SettingsHelper {
* @param string $settingId
* @param string $user
* @param string $password
* @param string $xRequestId
*
* @return ResponseInterface
*
@ -388,8 +362,7 @@ class SettingsHelper {
string $baseUrl,
string $settingId,
string $user,
string $password,
string $xRequestId,
string $password
): ResponseInterface {
$fullUrl = self::buildFullUrl($baseUrl, "values-get-by-unique-identifiers");
$body = json_encode(
@ -401,7 +374,6 @@ class SettingsHelper {
);
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
[],

View File

@ -79,7 +79,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
* @param string|null $xRequestId
*
* @return SimpleXMLElement
* @throws GuzzleException
@ -88,16 +87,14 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
public static function getSysInfo(
?string $baseUrl,
?string $adminUsername,
?string $adminPassword,
?string $xRequestId = ''
?string $adminPassword
): SimpleXMLElement {
$result = OcsApiHelper::sendRequest(
$baseUrl,
$adminUsername,
$adminPassword,
"GET",
"/apps/testing/api/v1/sysinfo",
$xRequestId
"/apps/testing/api/v1/sysinfo"
);
if ($result->getStatusCode() !== 200) {
throw new \Exception(
@ -112,7 +109,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
* @param string|null $xRequestId
*
* @return string
* @throws GuzzleException
@ -120,14 +116,12 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
public static function getServerRoot(
?string $baseUrl,
?string $adminUsername,
?string $adminPassword,
?string $xRequestId = ''
?string $adminPassword
): string {
$sysInfo = self::getSysInfo(
$baseUrl,
$adminUsername,
$adminPassword,
$xRequestId
$adminPassword
);
// server_root is a SimpleXMLElement object that "wraps" a string.
/// We want the bare string.
@ -200,7 +194,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
/**
*
* @param string|null $dirPathFromServerRoot e.g. 'apps2/myapp/appinfo'
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
@ -211,7 +204,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
*/
public static function mkDirOnServer(
?string $dirPathFromServerRoot,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
@ -225,7 +217,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$adminPassword,
"POST",
"/apps/testing/api/v1/dir",
$xRequestId,
['dir' => $dirPathFromServerRoot]
);
@ -239,7 +230,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
/**
*
* @param string|null $dirPathFromServerRoot e.g. 'apps2/myapp/appinfo'
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
@ -250,7 +240,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
*/
public static function rmDirOnServer(
?string $dirPathFromServerRoot,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
@ -264,7 +253,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$adminPassword,
"DELETE",
"/apps/testing/api/v1/dir",
$xRequestId,
['dir' => $dirPathFromServerRoot]
);
@ -279,7 +267,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
*
* @param string|null $filePathFromServerRoot e.g. 'app2/myapp/appinfo/info.xml'
* @param string|null $content
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
@ -291,7 +278,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
public static function createFileOnServer(
?string $filePathFromServerRoot,
?string $content,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
@ -305,7 +291,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$adminPassword,
"POST",
"/apps/testing/api/v1/file",
$xRequestId,
[
'file' => $filePathFromServerRoot,
'content' => $content
@ -322,7 +307,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
/**
*
* @param string|null $filePathFromServerRoot e.g. 'app2/myapp/appinfo/info.xml'
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
@ -333,7 +317,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
*/
public static function deleteFileOnServer(
?string $filePathFromServerRoot,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
@ -347,7 +330,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$adminPassword,
"DELETE",
"/apps/testing/api/v1/file",
$xRequestId,
[
'file' => $filePathFromServerRoot
]
@ -362,7 +344,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
/**
* @param string|null $fileInCore e.g. 'app2/myapp/appinfo/info.xml'
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
@ -373,7 +354,6 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
*/
public static function readFileFromServer(
?string $fileInCore,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
@ -393,8 +373,7 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$adminUsername,
$adminPassword,
'GET',
"/apps/testing/api/v1/file?file=$fileInCore",
$xRequestId
"/apps/testing/api/v1/file?file=$fileInCore"
);
self::assertSame(
200,

View File

@ -66,7 +66,6 @@ class SharingHelper {
* 0 = user, 1 = group, 3 = public (link),
* 6 = federated (cloud share).
* Pass either the number or the keyword.
* @param string $xRequestId
* @param string|null $shareWith The user or group id with which the file should
* be shared.
* @param boolean|null $publicUpload Whether to allow public upload to a public
@ -98,7 +97,6 @@ class SharingHelper {
string $password,
string $path,
$shareType,
string $xRequestId = '',
?string $shareWith = null,
?bool $publicUpload = false,
string $sharePassword = null,
@ -168,7 +166,6 @@ class SharingHelper {
$headers = ['OCS-APIREQUEST' => 'true'];
return HttpRequestHelper::post(
$fullUrl,
$xRequestId,
$user,
$password,
$headers,

View File

@ -37,7 +37,6 @@ use TusPhp\Tus\Client;
*/
class TusClient extends Client {
/**
* creates a resource with a post request and returns response.
*

View File

@ -43,7 +43,6 @@ class UploadHelper extends Assert {
* @param string|null $password
* @param string|null $source
* @param string|null $destination
* @param string|null $xRequestId
* @param array|null $headers
* @param int|null $davPathVersionToUse (1|2)
* @param bool $doChunkUpload
@ -59,7 +58,6 @@ class UploadHelper extends Assert {
?string $password,
?string $source,
?string $destination,
?string $xRequestId = '',
?array $headers = [],
?int $davPathVersionToUse = 1,
bool $doChunkUpload = false,
@ -76,7 +74,6 @@ class UploadHelper extends Assert {
$destination,
$headers,
null,
$xRequestId,
$data,
$davPathVersionToUse,
"files",
@ -107,7 +104,6 @@ class UploadHelper extends Assert {
$filename,
$headers,
null,
$xRequestId,
$chunk,
$davPathVersionToUse,
"files",

View File

@ -41,7 +41,6 @@ class UserHelper {
* @param string $value
* @param string $adminUser
* @param string $adminPassword
* @param string $xRequestId
* @param int|null $ocsApiVersion
*
* @return ResponseInterface
@ -54,7 +53,6 @@ class UserHelper {
string $value,
string $adminUser,
string $adminPassword,
string $xRequestId = '',
?int $ocsApiVersion = 2
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -63,7 +61,6 @@ class UserHelper {
$adminPassword,
"PUT",
"/cloud/users/" . $user,
$xRequestId,
["key" => $key, "value" => $value],
$ocsApiVersion
);
@ -77,7 +74,6 @@ class UserHelper {
* @param array|null $editData ['user' => '', 'key' => '', 'value' => '']
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param int|null $ocsApiVersion
*
* @return array
@ -88,7 +84,6 @@ class UserHelper {
?array $editData,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?int $ocsApiVersion = 2
): array {
$requests = [];
@ -105,7 +100,6 @@ class UserHelper {
$baseUrl,
'PUT',
$path,
$xRequestId,
$body
);
}
@ -130,7 +124,6 @@ class UserHelper {
* @param string|null $userName
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param int|null $ocsApiVersion
*
* @return ResponseInterface
@ -141,7 +134,6 @@ class UserHelper {
?string $userName,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?int $ocsApiVersion = 2
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -150,7 +142,6 @@ class UserHelper {
$adminPassword,
"GET",
"/cloud/users/" . $userName,
$xRequestId,
[],
$ocsApiVersion
);
@ -162,7 +153,6 @@ class UserHelper {
* @param string|null $userName
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param int|null $ocsApiVersion
*
* @return ResponseInterface
@ -173,7 +163,6 @@ class UserHelper {
?string $userName,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?int $ocsApiVersion = 2
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -182,7 +171,6 @@ class UserHelper {
$adminPassword,
"DELETE",
"/cloud/users/" . $userName,
$xRequestId,
[],
$ocsApiVersion
);
@ -195,7 +183,6 @@ class UserHelper {
* @param string|null $group
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param int|null $ocsApiVersion (1|2)
*
* @return ResponseInterface
@ -207,7 +194,6 @@ class UserHelper {
?string $group,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?int $ocsApiVersion = 2
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -216,7 +202,6 @@ class UserHelper {
$adminPassword,
"POST",
"/cloud/users/" . $user . "/groups",
$xRequestId,
['groupid' => $group],
$ocsApiVersion
);
@ -229,7 +214,6 @@ class UserHelper {
* @param string|null $group
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param int|null $ocsApiVersion (1|2)
*
* @return ResponseInterface
@ -241,7 +225,6 @@ class UserHelper {
?string $group,
?string $adminUser,
?string $adminPassword,
?string $xRequestId,
?int $ocsApiVersion = 2
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -250,7 +233,6 @@ class UserHelper {
$adminPassword,
"DELETE",
"/cloud/users/" . $user . "/groups",
$xRequestId,
['groupid' => $group],
$ocsApiVersion
);
@ -261,7 +243,6 @@ class UserHelper {
* @param string|null $baseUrl
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param string|null $search
*
* @return ResponseInterface
@ -271,7 +252,6 @@ class UserHelper {
?string $baseUrl,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?string $search =""
): ResponseInterface {
return OcsApiHelper::sendRequest(
@ -279,8 +259,7 @@ class UserHelper {
$adminUser,
$adminPassword,
"GET",
"/cloud/groups?search=" . $search,
$xRequestId
"/cloud/groups?search=" . $search
);
}
@ -289,7 +268,6 @@ class UserHelper {
* @param string|null $baseUrl
* @param string|null $adminUser
* @param string|null $adminPassword
* @param string|null $xRequestId
* @param string|null $search
*
* @return string[]
@ -299,14 +277,12 @@ class UserHelper {
?string $baseUrl,
?string $adminUser,
?string $adminPassword,
?string $xRequestId = '',
?string $search = ""
): array {
$result = self::getGroups(
$baseUrl,
$adminUser,
$adminPassword,
$xRequestId,
$search
);
$groups = HttpRequestHelper::getResponseXml($result, __METHOD__)->xpath(".//groups")[0];

View File

@ -112,7 +112,6 @@ class WebDavHelper {
* @param string|null $password
* @param string|null $path
* @param string|null $spaceId
* @param string|null $xRequestId
* @param int|null $davPathVersionToUse
*
* @return string
@ -124,7 +123,6 @@ class WebDavHelper {
?string $password,
?string $path,
?string $spaceId = null,
?string $xRequestId = '',
?int $davPathVersionToUse = self::DAV_VERSION_NEW
): string {
$body
@ -142,7 +140,6 @@ class WebDavHelper {
$path,
null,
$spaceId,
$xRequestId,
$body,
$davPathVersionToUse
);
@ -220,7 +217,6 @@ class WebDavHelper {
* string can contain namespace prefix,
* if no prefix is given 'd:' is used as prefix
* if an associative array is used, then the key will be used as namespace
* @param string|null $xRequestId
* @param string|null $folderDepth
* @param string|null $spaceId
* @param string|null $type
@ -238,7 +234,6 @@ class WebDavHelper {
?string $password,
?string $path,
?array $properties,
?string $xRequestId = '',
?string $folderDepth = '1',
?string $spaceId = null,
?string $type = "files",
@ -263,7 +258,6 @@ class WebDavHelper {
$path,
$headers,
$spaceId,
$xRequestId,
$body,
$davPathVersionToUse,
$type,
@ -285,7 +279,6 @@ class WebDavHelper {
* @param string|null $path
* @param string|null $propertyName
* @param string|null $propertyValue
* @param string|null $xRequestId
* @param string|null $namespaceString string containing prefix and namespace
* e.g "x1='http://whatever.org/ns'"
* @param int|null $davPathVersionToUse
@ -302,7 +295,6 @@ class WebDavHelper {
?string $path,
?string $propertyName,
?string $propertyValue,
?string $xRequestId = '',
?string $namespaceString = null,
?int $davPathVersionToUse = self::DAV_VERSION_NEW,
?string $type="files",
@ -332,7 +324,6 @@ class WebDavHelper {
$path,
[],
$spaceId,
$xRequestId,
$body,
$davPathVersionToUse,
$type
@ -378,7 +369,6 @@ class WebDavHelper {
* @param string|null $password
* @param string $path
* @param array|null $propertiesArray
* @param string|null $xRequestId
* @param int|null $davPathVersion
* @param string|null $namespaceString
* @param string|null $type
@ -392,7 +382,6 @@ class WebDavHelper {
?string $password,
string $path,
?array $propertiesArray,
?string $xRequestId = '',
?int $davPathVersion = null,
?string $namespaceString = null,
?string $type="files"
@ -431,7 +420,6 @@ class WebDavHelper {
$path,
[],
null,
$xRequestId,
$body,
$davPathVersion,
$type
@ -447,7 +435,6 @@ class WebDavHelper {
* @param string|null $path
* @param string|null $folderDepth
* @param string|null $spaceId
* @param string|null $xRequestId
* @param string[] $properties
* @param string|null $type
* @param int|null $davPathVersionToUse
@ -462,7 +449,6 @@ class WebDavHelper {
?string $path,
?string $folderDepth,
?string $spaceId = null,
?string $xRequestId = '',
?array $properties = null,
?string $type = "files",
?int $davPathVersionToUse = self::DAV_VERSION_NEW
@ -478,7 +464,6 @@ class WebDavHelper {
$password,
$path,
$properties,
$xRequestId,
$folderDepth,
$spaceId,
$type,
@ -510,7 +495,6 @@ class WebDavHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
*
* @return string
* @throws GuzzleException
@ -519,8 +503,7 @@ class WebDavHelper {
public static function getPersonalSpaceIdForUser(
string $baseUrl,
string $user,
string $password,
string $xRequestId
string $password
): string {
if (\array_key_exists($user, self::$spacesIdRef) && \array_key_exists("personal", self::$spacesIdRef[$user])) {
return self::$spacesIdRef[$user]["personal"];
@ -528,7 +511,7 @@ class WebDavHelper {
$personalSpaceId = '';
if (!OcisHelper::isTestingOnReva()) {
$response = GraphHelper::getMySpaces($baseUrl, $user, $password, '', $xRequestId);
$response = GraphHelper::getMySpaces($baseUrl, $user, $password, '');
Assert::assertEquals(200, $response->getStatusCode(), "Cannot list drives for user '$user'");
$drives = HttpRequestHelper::getJsonDecodedResponseBodyContent($response);
@ -546,7 +529,6 @@ class WebDavHelper {
$fullUrl = "$baseUrl/" . self::getDavPath(self::DAV_VERSION_NEW, $user);
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$xRequestId,
'PROPFIND',
$user,
$password
@ -584,7 +566,6 @@ class WebDavHelper {
* @param string $baseUrl
* @param string $user
* @param string $password
* @param string $xRequestId
*
* @return string
* @throws Exception|GuzzleException
@ -592,8 +573,7 @@ class WebDavHelper {
public static function getPersonalSpaceIdForUserOrFakeIfNotFound(
string $baseUrl,
string $user,
string $password,
string $xRequestId
string $password
): string {
if (\str_starts_with($user, "non-exist") || \str_starts_with($user, "nonexist")) {
return self::generateUUIDv4();
@ -602,8 +582,7 @@ class WebDavHelper {
return self::getPersonalSpaceIdForUser(
$baseUrl,
$user,
$password,
$xRequestId,
$password
);
}
@ -620,7 +599,6 @@ class WebDavHelper {
* @param string|null $path
* @param array|null $headers
* @param string|null $spaceId
* @param string|null $xRequestId
* @param string|null|resource|StreamInterface $body
* @param int|null $davPathVersionToUse (1|2|3)
* @param string|null $type of request
@ -646,7 +624,6 @@ class WebDavHelper {
?string $path,
?array $headers,
?string $spaceId = null,
?string $xRequestId = '',
$body = null,
?int $davPathVersionToUse = self::DAV_VERSION_OLD,
?string $type = "files",
@ -679,8 +656,7 @@ class WebDavHelper {
$spaceId = self::getPersonalSpaceIdForUserOrFakeIfNotFound(
$baseUrl,
$user,
$password,
$xRequestId
$password
);
}
}
@ -744,7 +720,6 @@ class WebDavHelper {
return HttpRequestHelper::sendRequest(
$fullUrl,
$xRequestId,
$method,
$doDavRequestAsUser ?? $user,
$password,
@ -843,7 +818,6 @@ class WebDavHelper {
* @param string|null $baseUrl
* @param string|null $fileName
* @param string|null $token
* @param string|null $xRequestId
* @param int|null $davVersionToUse
*
* @return string
@ -853,7 +827,6 @@ class WebDavHelper {
?string $baseUrl,
?string $fileName,
?string $token,
?string $xRequestId = '',
?int $davVersionToUse = self::DAV_VERSION_NEW
): string {
$response = self::propfind(
@ -862,7 +835,6 @@ class WebDavHelper {
null,
"$token/$fileName",
['d:getlastmodified'],
$xRequestId,
'1',
null,
"public-files",
@ -884,7 +856,6 @@ class WebDavHelper {
* @param string|null $password
* @param string|null $baseUrl
* @param string|null $resource
* @param string|null $xRequestId
* @param int|null $davPathVersionToUse
* @param string|null $spaceId
*
@ -897,7 +868,6 @@ class WebDavHelper {
?string $password,
?string $baseUrl,
?string $resource,
?string $xRequestId = '',
?int $davPathVersionToUse = self::DAV_VERSION_NEW,
?string $spaceId = null,
): string {
@ -907,7 +877,6 @@ class WebDavHelper {
$password,
$resource,
["d:getlastmodified"],
$xRequestId,
"0",
$spaceId,
"files",

View File

@ -219,7 +219,6 @@ class ArchiverContext implements Context {
}
return HttpRequestHelper::get(
$this->getArchiverUrl($queryString),
$this->featureContext->getStepLineRef(),
$downloader,
$this->featureContext->getPasswordForUser($downloader),
$headers
@ -252,7 +251,6 @@ class ArchiverContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->getArchiverUrl($queryString),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
)

View File

@ -86,7 +86,6 @@ class AuthContext implements Context {
$fullUrl = $this->featureContext->getBaseUrl() . "/$url";
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
$method,
null,
null,
@ -240,7 +239,6 @@ class AuthContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
$this->featureContext->substituteInLineCodes($row['endpoint']),
$this->featureContext->getStepLineRef(),
$method
)
);
@ -707,7 +705,6 @@ class AuthContext implements Context {
$fullUrl = $this->featureContext->getBaseUrl() . "/$endpoint";
$response = HttpRequestHelper::sendRequestOnce(
$fullUrl,
$this->featureContext->getStepLineRef(),
$method,
$username,
$this->featureContext->getPasswordForUser($user)

View File

@ -74,7 +74,6 @@ class CapabilitiesContext implements Context {
$password,
'GET',
'/cloud/capabilities' . ($formatJson ? '?format=json' : ''),
$this->featureContext->getStepLineRef(),
[],
$this->featureContext->getOcsApiVersion()
);

View File

@ -187,7 +187,6 @@ class ChecksumContext implements Context {
$path,
null,
$spaceId,
$this->featureContext->getStepLineRef(),
$body,
$this->featureContext->getDavPathVersion()
);

View File

@ -101,7 +101,6 @@ class CollaborationContext implements Context {
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$viewMode
)->getBody()->getContents()
);
@ -115,8 +114,7 @@ class CollaborationContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$wopiSrc . "?access_token=$accessToken",
$this->featureContext->getStepLineRef()
$wopiSrc . "?access_token=$accessToken"
)
);
}
@ -143,7 +141,6 @@ class CollaborationContext implements Context {
$this->featureContext->setResponse(
CollaborationHelper::createFile(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$parentContainerId,
@ -169,7 +166,6 @@ class CollaborationContext implements Context {
$responseXmlObject = HttpRequestHelper::getResponseXml(
HttpRequestHelper::sendRequest(
"$baseUrl/$davPath/$folder",
$this->featureContext->getStepLineRef(),
"PROPFIND",
"public",
$this->featureContext->getActualPassword($password)
@ -184,7 +180,6 @@ class CollaborationContext implements Context {
$this->featureContext->setResponse(
CollaborationHelper::createFile(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
"public",
$this->featureContext->getActualPassword($password),
$parentContainerId,
@ -255,8 +250,7 @@ class CollaborationContext implements Context {
$app,
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef()
$this->featureContext->getBaseUrl()
)->getBody()->getContents()
);
$accessToken = $response->form_parameters->access_token;
@ -271,8 +265,7 @@ class CollaborationContext implements Context {
$fullUrl = substr($wopiSrc, 0, $position) . WebDavHelper::generateUUIDv4();
$this->featureContext->setResponse(
HttpRequestHelper::get(
$fullUrl . "?access_token=$accessToken",
$this->featureContext->getStepLineRef()
$fullUrl . "?access_token=$accessToken"
)
);
}
@ -291,7 +284,6 @@ class CollaborationContext implements Context {
$this->featureContext->setResponse(
CollaborationHelper::createFile(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$parentContainerId,
@ -316,8 +308,7 @@ class CollaborationContext implements Context {
$rows['app'],
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef()
$this->featureContext->getBaseUrl()
);
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $appResponse);
$this->setLastAppOpenData($appResponse->getBody()->getContents());
@ -343,8 +334,7 @@ class CollaborationContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$wopiSrc . "?access_token=$accessToken",
$this->featureContext->getStepLineRef()
$wopiSrc . "?access_token=$accessToken"
)
);
}
@ -456,7 +446,6 @@ class CollaborationContext implements Context {
$parentContainerId = $this->featureContext->getFileIdForPath($user, "/");
$response = CollaborationHelper::createFile(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$parentContainerId,

View File

@ -52,7 +52,7 @@ class EmailContext implements Context {
*/
public function clearAllEmails(): void {
try {
EmailHelper::deleteAllEmails($this->featureContext->getStepLineRef());
EmailHelper::deleteAllEmails();
} catch (Exception $e) {
echo __METHOD__ .
" could not delete email messages?\n" .
@ -83,8 +83,7 @@ class EmailContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
'',
$this->featureContext->getStepLineRef()
''
)
);
$expectedEmailBodyContent = $this->featureContext->substituteInLineCodes(
@ -138,14 +137,14 @@ class EmailContext implements Context {
public function userShouldHaveEmail(string $user, int $count): void {
$address = $this->featureContext->getEmailAddressForUser($user);
$query = 'to:' . $address;
$response = EmailHelper::searchEmails($query, $this->featureContext->getStepLineRef());
$response = EmailHelper::searchEmails($query);
$emails = $this->featureContext->getJsonDecodedResponse($response);
if ($emails["messages_count"] <= $count) {
echo "[INFO] Mailbox is empty...\n";
// Wait for 1 second and try again
// the mailbox might not be created yet
sleep(1);
$response = EmailHelper::searchEmails($query, $this->featureContext->getStepLineRef());
$response = EmailHelper::searchEmails($query);
$emails = $this->featureContext->getJsonDecodedResponse($response);
}
@ -193,7 +192,7 @@ class EmailContext implements Context {
$ignoreWhiteSpace = false
): void {
$address = $this->featureContext->getEmailAddressForUser($user);
$actualEmailBodyContent = $this->getBodyOfLastEmail($address, $this->featureContext->getStepLineRef());
$actualEmailBodyContent = $this->getBodyOfLastEmail($address);
if ($ignoreWhiteSpace) {
$expectedEmailBodyContent = preg_replace('/\s+/', '', $expectedEmailBodyContent);
$actualEmailBodyContent = preg_replace('/\s+/', '', $actualEmailBodyContent);
@ -212,7 +211,6 @@ class EmailContext implements Context {
* For email number, 1 means the latest one
*
* @param string $emailAddress
* @param string|null $xRequestId
* @param int|null $waitTimeSec Time to wait for the email if the email has been delivered
*
* @return string
@ -221,7 +219,6 @@ class EmailContext implements Context {
*/
public function getBodyOfLastEmail(
string $emailAddress,
?string $xRequestId,
?int $waitTimeSec = EMAIL_WAIT_TIMEOUT_SEC
): string {
$currentTime = \time();
@ -229,11 +226,11 @@ class EmailContext implements Context {
while ($currentTime <= $endTime) {
$query = 'to:' . $emailAddress;
$mailResponse = $this->featureContext->getJsonDecodedResponse(
EmailHelper::searchEmails($query, $xRequestId)
EmailHelper::searchEmails($query)
);
if ($mailResponse["messages_count"] > 0) {
$lastEmail = $this->featureContext->getJsonDecodedResponse(
EmailHelper::getEmailById("latest", $query, $xRequestId)
EmailHelper::getEmailById("latest", $query)
);
$body = \str_replace(
"\r\n",

View File

@ -159,7 +159,6 @@ class FavoritesContext implements Context {
"/",
null,
null,
$this->featureContext->getStepLineRef(),
$body,
$this->featureContext->getDavPathVersion()
);
@ -229,7 +228,6 @@ class FavoritesContext implements Context {
$path,
'favorite',
(string)$favOrUnfav,
$this->featureContext->getStepLineRef(),
"oc='http://owncloud.org/ns'",
$this->featureContext->getDavPathVersion(),
'files',

View File

@ -138,14 +138,6 @@ class FeatureContext extends BehatVariablesContext {
*/
private string $scenarioString = '';
/**
* A full unique reference to the step that is currently executing.
* Example: apiComments/createComments.feature:24-28
* That is line 28, in the scenario at line 24, in the createComments feature
* in the apiComments suite.
*/
private string $stepLineRef = '';
private int $ocsApiVersion = 1;
private ?ResponseInterface $response = null;
private string $responseUser = '';
@ -190,8 +182,7 @@ class FeatureContext extends BehatVariablesContext {
$autoSyncSetting = SettingsHelper::getAutoAcceptSharesSettingValue(
$this->baseUrl,
$user,
$this->getPasswordForUser($user),
$this->getStepLineRef()
$this->getPasswordForUser($user)
);
$this->autoSyncSettings[$user] = $autoSyncSetting;
@ -577,7 +568,6 @@ class FeatureContext extends BehatVariablesContext {
if (\file_exists(HttpLogger::getScenarioLogPath())) {
\unlink(HttpLogger::getScenarioLogPath());
}
// Write the scenario log
HttpLogger::writeLog(HttpLogger::getScenarioLogPath(), $logMessage);
}
@ -837,21 +827,6 @@ class FeatureContext extends BehatVariablesContext {
return $this->removeSchemeFromUrl($this->getRemoteBaseUrl());
}
/**
* returns the reference to the current line being executed.
*
* @return string
*/
public function getStepLineRef(): string {
// If we are in BeforeScenario and possibly before any particular step
// is being executed, then stepLineRef might be empty. In that case
// return just the string for the scenario.
if ($this->stepLineRef === '') {
return $this->scenarioString;
}
return $this->stepLineRef;
}
/**
* returns the base URL without any sub-path e.g. http://localhost:8080
* of the base URL http://localhost:8080/owncloud
@ -1347,7 +1322,6 @@ class FeatureContext extends BehatVariablesContext {
$this->setResponse(
HttpRequestHelper::sendRequest(
$fullUrl,
$this->getStepLineRef(),
$method,
"public",
$password,
@ -1501,7 +1475,6 @@ class FeatureContext extends BehatVariablesContext {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->getStepLineRef(),
$verb,
$user,
$password,
@ -1756,7 +1729,6 @@ class FeatureContext extends BehatVariablesContext {
public function mkDirOnServer(string $dirPathFromServerRoot): void {
SetupHelper::mkDirOnServer(
$dirPathFromServerRoot,
$this->getStepLineRef(),
$this->getBaseUrl(),
$this->getAdminUsername(),
$this->getAdminPassword()
@ -2041,7 +2013,6 @@ class FeatureContext extends BehatVariablesContext {
return HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword(),
$this->guzzleClientHeaders,
@ -2625,8 +2596,7 @@ class FeatureContext extends BehatVariablesContext {
return WebDavHelper::getPersonalSpaceIdForUserOrFakeIfNotFound(
$this->getBaseUrl(),
$user,
$this->getPasswordForUser($user),
$this->getStepLineRef()
$this->getPasswordForUser($user)
);
}
return null;
@ -2707,7 +2677,9 @@ class FeatureContext extends BehatVariablesContext {
* @return void
*/
public function beforeEachStep(BeforeStepScope $scope): void {
$this->stepLineRef = $this->scenarioString . '-' . $scope->getStep()->getLine();
$stepLineRef = '';
$stepLineRef = $this->scenarioString . '-' . $scope->getStep()->getLine();
HttpRequestHelper::setCurrentScenarioRef($stepLineRef);
}
/**
@ -2757,7 +2729,7 @@ class FeatureContext extends BehatVariablesContext {
public function removeTemporaryStorageOnServerAfter(): void {
SetupHelper::rmDirOnServer(
TEMPORARY_STORAGE_DIR_ON_REMOTE_SERVER,
$this->getStepLineRef()
HttpRequestHelper::getCurrentScenarioRef()
);
}
@ -2914,7 +2886,6 @@ class FeatureContext extends BehatVariablesContext {
public function getUserIdByUserName(string $userName): string {
$response = GraphHelper::getUser(
$this->getBaseUrl(),
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword(),
$userName
@ -2938,7 +2909,6 @@ class FeatureContext extends BehatVariablesContext {
public function getGroupIdByGroupName(string $groupName): string {
$response = GraphHelper::getGroup(
$this->getBaseUrl(),
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword(),
$groupName

View File

@ -247,7 +247,6 @@ class FilesVersionsContext implements Context {
$xmlPart[$versionIndex];
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'COPY',
$user,
$this->featureContext->getPasswordForUser($user),
@ -468,7 +467,6 @@ class FilesVersionsContext implements Context {
);
return HttpRequestHelper::get(
$url,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -546,7 +544,6 @@ class FilesVersionsContext implements Context {
$metaPath,
['Content-Type' => 'text/xml','Depth' => '0'],
null,
$this->featureContext->getStepLineRef(),
$body,
$this->featureContext->getDavPathVersion(),
null
@ -585,7 +582,6 @@ class FilesVersionsContext implements Context {
$password,
$fileId,
$properties,
$this->featureContext->getStepLineRef(),
(string) $folderDepth,
null,
"versions"

View File

@ -216,7 +216,6 @@ class GraphContext implements Context {
$userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id') ?: $user;
return GraphHelper::editUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$byUser,
$this->featureContext->getPasswordForUser($byUser),
$userId,
@ -242,7 +241,6 @@ class GraphContext implements Context {
$userId = $userId ?: $user;
return GraphHelper::getUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$userId
@ -264,7 +262,6 @@ class GraphContext implements Context {
return GraphHelper::deleteGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$groupId
@ -298,7 +295,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::deleteUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$user
@ -325,7 +321,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($byUser);
return GraphHelper::removeUserFromGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$userId,
@ -351,7 +346,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::deleteUserByUserId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$userId
@ -487,7 +481,6 @@ class GraphContext implements Context {
$userId = $this->featureContext->getAttributeOfCreatedUser($user, "id") ?: $user;
return GraphHelper::editUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$userId,
@ -579,7 +572,6 @@ class GraphContext implements Context {
return GraphHelper::getGroups(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"]
);
@ -625,7 +617,6 @@ class GraphContext implements Context {
return GraphHelper::getMembersList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$this->featureContext->getAttributeOfCreatedGroup($group, 'id')
@ -648,7 +639,6 @@ class GraphContext implements Context {
return GraphHelper::getSingleOrAllGroupsAlongWithMembers(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
($group) ? $this->featureContext->getAttributeOfCreatedGroup($group, 'id') : null
@ -697,7 +687,6 @@ class GraphContext implements Context {
$rows = $table->getRowsHash();
$response = GraphHelper::createUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$rows["userName"],
@ -745,7 +734,6 @@ class GraphContext implements Context {
}
return GraphHelper::addUserToGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$userId,
@ -864,7 +852,6 @@ class GraphContext implements Context {
return GraphHelper::createGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$group,
@ -990,7 +977,6 @@ class GraphContext implements Context {
public function userChangesOwnPassword(string $user, string $currentPassword, string $newPassword): void {
$response = GraphHelper::changeOwnPassword(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$currentPassword,
@ -1101,7 +1087,6 @@ class GraphContext implements Context {
return GraphHelper::updateGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$oldGroupId,
@ -1209,7 +1194,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($user);
return GraphHelper::getOwnInformationAndGroupMemberships(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
);
@ -1244,7 +1228,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::getUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$user
@ -1260,13 +1243,11 @@ class GraphContext implements Context {
* @param string $searchTerm
*
* @return void
* @throws GuzzleException
*/
public function userSearchesForUserUsingGraphApi(string $byUser, string $searchTerm): void {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::searchUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$searchTerm,
@ -1287,7 +1268,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($byUser);
$response = GraphHelper::searchFederatedUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$searchTerm,
@ -1304,11 +1284,10 @@ class GraphContext implements Context {
* @return void
* @throws GuzzleException
*/
public function userGetsAllUserUsingTheGraphApi(string $user) {
public function userGetsAllUserUsingTheGraphApi(string $user): void {
$credentials = $this->getAdminOrUserCredentials($user);
$response = GraphHelper::getUsers(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
);
@ -1331,7 +1310,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($user);
return GraphHelper::getUserWithDriveInformation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$user
@ -1354,7 +1332,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($user);
return GraphHelper::getUserWithGroupInformation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$user
@ -1369,7 +1346,7 @@ class GraphContext implements Context {
*
* @return void
*/
public function userTriesToGetInformationOfUserAlongWithHisDriveData(string $byUser, string $user) {
public function userTriesToGetInformationOfUserAlongWithHisDriveData(string $byUser, string $user): void {
$response = $this->retrieveUserInformationAlongWithDriveUsingGraphApi($byUser, $user);
$this->featureContext->setResponse($response);
}
@ -1382,7 +1359,7 @@ class GraphContext implements Context {
*
* @return void
*/
public function userTriesToGetInformationOfUserAlongWithHisGroup(string $byUser, string $user) {
public function userTriesToGetInformationOfUserAlongWithHisGroup(string $byUser, string $user): void {
$response = $this->retrieveUserInformationAlongWithGroupUsingGraphApi($byUser, $user);
$this->featureContext->setResponse($response);
}
@ -1420,7 +1397,6 @@ class GraphContext implements Context {
return GraphHelper::addUsersToGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$groupId,
@ -1487,7 +1463,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId),
$this->featureContext->getStepLineRef(),
'PATCH',
$credentials["username"],
$credentials["password"],
@ -1524,7 +1499,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::post(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId . '/members/$ref'),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
['Content-Type' => 'application/json'],
@ -1622,7 +1596,6 @@ class GraphContext implements Context {
public function userGetsAllApplicationsUsingTheGraphApi(string $user) {
$response = GraphHelper::getApplications(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
);
@ -1693,7 +1666,6 @@ class GraphContext implements Context {
$groupId = $this->featureContext->getGroupIdByGroupName($group);
$response = GraphHelper::getUsersWithFilterMemberOf(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$groupId
@ -1717,7 +1689,6 @@ class GraphContext implements Context {
}
$response = GraphHelper::getUsersOfTwoGroups(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$groupsIdArray
@ -1742,7 +1713,6 @@ class GraphContext implements Context {
) {
$response = GraphHelper::getUsersFromOneOrOtherGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$firstGroup,
@ -1762,7 +1732,6 @@ class GraphContext implements Context {
public function getRoleIdByRoleName(string $role): string {
$response = GraphHelper::getApplications(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword()
);
@ -1789,7 +1758,6 @@ class GraphContext implements Context {
public function userGetsAllUsersWithRoleUsingTheGraphApi(string $user, string $role) {
$response = GraphHelper::getUsersWithFilterRoleAssignment(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->getRoleIdByRoleName($role)
@ -1814,7 +1782,6 @@ class GraphContext implements Context {
) {
$response = GraphHelper::getUsersWithFilterRolesAssignmentAndMemberOf(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->getRoleIdByRoleName($role),
@ -1843,7 +1810,6 @@ class GraphContext implements Context {
$response = GraphHelper::assignRole(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$this->appEntity["appRoles"][$role],
@ -1872,7 +1838,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getAssignedRole(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$admin,
$this->featureContext->getPasswordForUser($admin),
$userId
@ -1895,7 +1860,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getAssignedRole(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$userId
@ -1914,7 +1878,6 @@ class GraphContext implements Context {
$this->featureContext->getJsonDecodedResponse(
GraphHelper::getApplications(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
)
@ -1977,7 +1940,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$groupName
@ -1999,7 +1961,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::searchGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$searchTerm
@ -2100,7 +2061,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId),
$this->featureContext->getStepLineRef(),
'PATCH',
$credentials["username"],
$credentials["password"],
@ -2137,7 +2097,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::post(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId . '/members/$ref'),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
['Content-Type' => 'application/json'],
@ -2179,7 +2138,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::post(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId . '/members/$ref'),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
['Content-Type' => 'application/json'],
@ -2222,7 +2180,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
GraphHelper::getFullUrl($this->featureContext->getBaseUrl(), 'groups/' . $groupId),
$this->featureContext->getStepLineRef(),
'PATCH',
$credentials["username"],
$credentials["password"],
@ -2257,7 +2214,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::addUsersToGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$groupId,
@ -2287,7 +2243,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::addUserToGroup(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$userId,
@ -2339,7 +2294,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getPersonalDriveInformationByUserId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$userId
@ -2362,7 +2316,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::generateGDPRReport(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$userId,
@ -2456,7 +2409,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::generateGDPRReport(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$this->featureContext->getAttributeOfCreatedUser($ofUser, 'id'),
@ -2477,7 +2429,6 @@ class GraphContext implements Context {
return (
GraphHelper::getAssignedRole(
$this->featureContext->getBAseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getAdminUsername(),
$this->featureContext->getAdminPassword(),
$userId
@ -2514,7 +2465,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::unassignRole(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$appRoleAssignmentId,
@ -2588,7 +2538,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::assignRole(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$this->appEntity["appRoles"][$role],
@ -2611,7 +2560,6 @@ class GraphContext implements Context {
$credentials = $this->getAdminOrUserCredentials($user);
$response = GraphHelper::switchSystemLanguage(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$language
@ -2637,7 +2585,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::switchSystemLanguage(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$language
@ -2678,7 +2625,6 @@ class GraphContext implements Context {
do {
$response = GraphHelper::getSharesSharedWithMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password']
);
@ -2725,7 +2671,6 @@ class GraphContext implements Context {
}
return GraphHelper::getSharesSharedByMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password']
);
@ -2836,7 +2781,6 @@ class GraphContext implements Context {
): void {
$response = GraphHelper::createUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$byUser,
$password,
$user,
@ -2865,7 +2809,6 @@ class GraphContext implements Context {
$userId = $this->featureContext->getUserIdByUserName($byUser);
$response = GraphHelper::editUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$byUser,
$this->featureContext->getPasswordForUser($byUser),
$userId,
@ -2889,7 +2832,6 @@ class GraphContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getPermissionsRoleDefinitions(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
)
@ -2912,7 +2854,6 @@ class GraphContext implements Context {
GraphHelper::getPermissionRoleDefinition(
$permissionRole,
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
)
@ -2937,7 +2878,6 @@ class GraphContext implements Context {
$resourceId = $this->spacesContext->getResourceId($user, $spaceName, $resource);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId
@ -2959,14 +2899,12 @@ class GraphContext implements Context {
): void {
$resourceId = GraphHelper::getShareMountId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$folder
);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId
@ -2993,7 +2931,6 @@ class GraphContext implements Context {
$resourceId = $this->spacesContext->getResourceId($owner, $spaceName, $file);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId
@ -3013,7 +2950,6 @@ class GraphContext implements Context {
$spaceId = ($this->spacesContext->getSpaceByName($user, $spaceName))["id"];
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId
@ -3037,7 +2973,6 @@ class GraphContext implements Context {
): void {
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
"public",
$this->featureContext->getActualPassword($password),
$this->spacesContext->getSpaceIdByName($user, $spaceName)
@ -3063,7 +2998,6 @@ class GraphContext implements Context {
): void {
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
"public",
$this->featureContext->getPasswordForUser($owner),
$this->spacesContext->getResourceId($owner, $space, $resource)
@ -3092,7 +3026,6 @@ class GraphContext implements Context {
$resourceId = $this->spacesContext->getResourceId($user, $spaceName, $resource);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId,
@ -3146,7 +3079,6 @@ class GraphContext implements Context {
$resourceId = $this->spacesContext->getResourceId($user, $spaceName, $resource);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId,
@ -3168,7 +3100,6 @@ class GraphContext implements Context {
$response = GraphHelper::getFederatedUsers(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password']
);
@ -3189,7 +3120,6 @@ class GraphContext implements Context {
$response = GraphHelper::getAllUsers(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password']
);

View File

@ -93,7 +93,6 @@ class NotificationContext implements Context {
$this->featureContext->getAdminPassword(),
'DELETE',
$this->globalNotificationEndpointPath,
$this->featureContext->getStepLineRef(),
json_encode($payload)
);
}
@ -109,7 +108,6 @@ class NotificationContext implements Context {
$this->featureContext->getBaseUrl(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef()
);
$headers = ["accept-language" => $language];
return OcsApiHelper::sendRequest(
@ -118,7 +116,6 @@ class NotificationContext implements Context {
$this->featureContext->getPasswordForUser($user),
'GET',
$this->notificationEndpointPath,
$this->featureContext->getStepLineRef(),
[],
2,
$headers
@ -220,7 +217,6 @@ class NotificationContext implements Context {
$this->featureContext->getPasswordForUser($user),
'DELETE',
$this->notificationEndpointPath,
$this->featureContext->getStepLineRef(),
\json_encode($payload),
2
);
@ -546,7 +542,6 @@ class NotificationContext implements Context {
$user ? $this->featureContext->getPasswordForUser($user) : $this->featureContext->getAdminPassword(),
'POST',
$this->globalNotificationEndpointPath,
$this->featureContext->getStepLineRef(),
json_encode($payload)
);
}
@ -615,7 +610,6 @@ class NotificationContext implements Context {
$user ? $this->featureContext->getPasswordForUser($user) : $this->featureContext->getAdminPassword(),
'DELETE',
$this->globalNotificationEndpointPath,
$this->featureContext->getStepLineRef(),
json_encode($payload)
);
$this->featureContext->setResponse($response);

View File

@ -116,7 +116,6 @@ class OCSContext implements Context {
$password,
$verb,
$url,
$this->featureContext->getStepLineRef(),
$bodyArray,
$this->featureContext->getOcsApiVersion(),
$headers

View File

@ -85,7 +85,6 @@ class OcmContext implements Context {
public function createInvitation(string $user, $email = null, $description = null): ResponseInterface {
$response = OcmHelper::createInvitation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$email,
@ -143,7 +142,6 @@ class OcmContext implements Context {
}
return OcmHelper::acceptInvitation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$token ? $token : $this->getLastFederatedInvitationToken(),
@ -203,7 +201,6 @@ class OcmContext implements Context {
$this->featureContext->setResponse(
OcmHelper::acceptInvitation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$token,
@ -222,7 +219,6 @@ class OcmContext implements Context {
$currentServer = $this->featureContext->getCurrentServer();
$response = OcmHelper::findAcceptedUsers(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -288,7 +284,6 @@ class OcmContext implements Context {
public function listInvitations(string $user): ResponseInterface {
return OcmHelper::listInvite(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -363,7 +358,6 @@ class OcmContext implements Context {
$ocmUser['idp'] = $idp ?? $ocmUser['idp'];
return OcmHelper::deleteConnection(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$ocmUser['user_id'],
@ -385,7 +379,6 @@ class OcmContext implements Context {
$davPath = WebDavHelper::getDavPath($this->featureContext->getDavPathVersion());
$response = HttpRequestHelper::get(
"$baseUrl/$davPath/$remoteItemId",
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
);
@ -404,7 +397,6 @@ class OcmContext implements Context {
$queryString = $this->archiverContext->getArchiverQueryString($user, $resource, 'remoteItemIds');
$response = HttpRequestHelper::get(
$this->archiverContext->getArchiverUrl($queryString),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);

View File

@ -582,7 +582,6 @@ trait Provisioning {
);
$request = GraphHelper::createRequest(
$this->getBaseUrl(),
$this->getStepLineRef(),
"POST",
'users',
$body,
@ -873,7 +872,6 @@ trait Provisioning {
$fullUrl = $this->getBaseUrl() . "/ocs/v$this->ocsApiVersion.php/cloud/groups";
return HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword()
);
@ -892,7 +890,6 @@ trait Provisioning {
$actualPassword = $this->getUserPassword($actualUser);
$this->response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$actualUser,
$actualPassword
);
@ -923,7 +920,6 @@ trait Provisioning {
$actualPassword = $this->getUserPassword($actualUser);
return HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$actualUser,
$actualPassword
);
@ -943,7 +939,6 @@ trait Provisioning {
$url = $this->getBaseUrl() . "/ocs/v$this->ocsApiVersion.php/cloud/users/$user";
HttpRequestHelper::get(
$url,
$this->getStepLineRef(),
$user,
$password
);
@ -1111,7 +1106,6 @@ trait Provisioning {
$reqUser = $byUser ? $this->getActualUsername($byUser) : $this->getAdminUsername();
$response = GraphHelper::createUser(
$this->getBaseUrl(),
$this->getStepLineRef(),
$reqUser,
$this->getPasswordForUser($reqUser),
$user,
@ -1156,7 +1150,6 @@ trait Provisioning {
$group,
$this->getAdminUsername(),
$this->getAdminPassword(),
$this->getStepLineRef(),
$this->ocsApiVersion
);
} else {
@ -1255,7 +1248,6 @@ trait Provisioning {
$response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$requestingUser,
$requestingPassword
);
@ -1321,7 +1313,6 @@ trait Provisioning {
$fullUrl = $this->getBaseUrl() . "/ocs/v2.php/cloud/users/$user/groups";
$response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword()
);
@ -1351,7 +1342,6 @@ trait Provisioning {
$fullUrl = $this->getBaseUrl() . "/ocs/v2.php/cloud/groups/$group";
$response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword()
);
@ -1750,7 +1740,6 @@ trait Provisioning {
$user,
$this->getAdminUsername(),
$this->getAdminPassword(),
$this->getStepLineRef(),
$this->ocsApiVersion
);
} else {
@ -1806,7 +1795,6 @@ trait Provisioning {
$fullUrl = $this->getBaseUrl() . "/graph/v1.0/groups/$group";
$this->response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword()
);
@ -1841,7 +1829,6 @@ trait Provisioning {
$fullUrl = $this->getBaseUrl() . "/ocs/v2.php/cloud/users/$user/groups";
$response = HttpRequestHelper::get(
$fullUrl,
$this->getStepLineRef(),
$this->getAdminUsername(),
$this->getAdminPassword()
);
@ -2044,7 +2031,6 @@ trait Provisioning {
. "/ocs/v$this->ocsApiVersion.php/cloud/users/$actualOtherUser/$action";
return HttpRequestHelper::put(
$fullUrl,
$this->getStepLineRef(),
$actualUser,
$actualPassword
);

View File

@ -143,7 +143,6 @@ class PublicWebDavContext implements Context {
];
return HttpRequestHelper::delete(
$fullUrl,
$this->featureContext->getStepLineRef(),
$userName,
$password,
$headers
@ -217,7 +216,6 @@ class PublicWebDavContext implements Context {
];
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"MOVE",
$userName,
$password,
@ -291,7 +289,6 @@ class PublicWebDavContext implements Context {
return HttpRequestHelper::get(
$fullUrl,
$this->featureContext->getStepLineRef(),
$username,
$password
);
@ -336,7 +333,6 @@ class PublicWebDavContext implements Context {
}
return HttpRequestHelper::get(
$fullUrl,
$this->featureContext->getStepLineRef(),
$userName,
$password,
$headers
@ -381,7 +377,6 @@ class PublicWebDavContext implements Context {
$headers["Destination"] = $fullDestUrl;
return HttpRequestHelper::sendRequest(
$fullSourceUrl,
$this->featureContext->getStepLineRef(),
"COPY",
null,
null,
@ -1015,7 +1010,6 @@ class PublicWebDavContext implements Context {
return HttpRequestHelper::sendRequest(
$url,
$this->featureContext->getStepLineRef(),
'MKCOL',
$userName,
$password
@ -1097,8 +1091,7 @@ class PublicWebDavContext implements Context {
WebDavHelper::getMtimeOfFileInPublicLinkShare(
$baseUrl,
$fileName,
$token,
$this->featureContext->getStepLineRef()
$token
)
);
}
@ -1123,8 +1116,7 @@ class PublicWebDavContext implements Context {
WebDavHelper::getMtimeOfFileInPublicLinkShare(
$baseUrl,
$fileName,
$token,
$this->featureContext->getStepLineRef()
$token
)
);
}
@ -1181,7 +1173,6 @@ class PublicWebDavContext implements Context {
$headers = \array_merge($headers, $additionalHeaders);
return HttpRequestHelper::put(
$url,
$this->featureContext->getStepLineRef(),
$userName,
$password,
$headers,
@ -1262,7 +1253,6 @@ class PublicWebDavContext implements Context {
$fullUrl = $this->featureContext->getBaseUrl() . "/$davPath";
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
$method,
$username,
$password,

View File

@ -118,7 +118,6 @@ class SearchContext implements Context {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'REPORT',
$user,
$password,

View File

@ -57,8 +57,7 @@ class SettingsContext implements Context {
return SettingsHelper::getRolesList(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef()
$this->featureContext->getPasswordForUser($user)
);
}
@ -93,8 +92,7 @@ class SettingsContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$userId,
$roleId,
$this->featureContext->getStepLineRef(),
$roleId
);
}
@ -112,8 +110,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$userId,
$this->featureContext->getStepLineRef(),
$userId
);
}
@ -329,8 +326,7 @@ class SettingsContext implements Context {
return SettingsHelper::getBundlesList(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef(),
$this->featureContext->getPasswordForUser($user)
);
}
@ -348,8 +344,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$bundleName,
$this->featureContext->getStepLineRef()
$bundleName
);
}
@ -367,7 +362,6 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef(),
$headers
);
}
@ -443,8 +437,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
}
@ -512,8 +505,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
}
@ -577,8 +569,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
json_encode($body),
$this->featureContext->getStepLineRef(),
json_encode($body)
);
$this->featureContext->setResponse($response);
}
@ -628,8 +619,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
json_encode($body),
$this->featureContext->getStepLineRef(),
json_encode($body)
);
}
@ -695,8 +685,7 @@ class SettingsContext implements Context {
$this->featureContext->getBaseUrl(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
json_encode($body, JSON_THROW_ON_ERROR),
$this->featureContext->getStepLineRef()
json_encode($body, JSON_THROW_ON_ERROR)
);
}

View File

@ -823,7 +823,6 @@ trait Sharing {
$this->getPasswordForUser($user),
"PUT",
$this->getSharesEndpointPath("/$share_id"),
$this->getStepLineRef(),
$bodyRows,
$this->ocsApiVersion
);
@ -948,7 +947,6 @@ trait Sharing {
$this->getPasswordForUser($user),
$path,
$shareType,
$this->getStepLineRef(),
$shareWith,
$publicUpload,
$sharePassword,
@ -2030,7 +2028,6 @@ trait Sharing {
$this->getPasswordForUser($user),
"GET",
$this->getSharesEndpointPath($endpointPath),
$this->getStepLineRef(),
[],
$this->ocsApiVersion
);
@ -2683,7 +2680,6 @@ trait Sharing {
$this->getPasswordForUser($user),
"GET",
$this->getSharesEndpointPath("?path=$path"),
$this->getStepLineRef(),
[],
$this->ocsApiVersion
);
@ -3286,7 +3282,6 @@ trait Sharing {
$this->getPasswordForUser($user),
"GET",
$url,
$this->getStepLineRef(),
[],
$this->ocsApiVersion
);
@ -3351,8 +3346,7 @@ trait Sharing {
$davPath = WebdavHelper::getDavPath($this->getDavPathVersion(), $token, "public-files");
$url = "$baseUrl/$davPath/$fileName?preview=1";
return HttpRequestHelper::get(
$url,
$this->getStepLineRef()
$url
);
}
@ -3439,7 +3433,6 @@ trait Sharing {
$response = HttpRequestHelper::post(
$url,
$this->getStepLineRef(),
$user,
$userPassword,
null,
@ -3534,7 +3527,6 @@ trait Sharing {
$response = HttpRequestHelper::post(
$url,
$this->getStepLineRef(),
$user,
$userPassword,
null,
@ -3585,7 +3577,6 @@ trait Sharing {
$this->getAdminPassword(),
'POST',
"/apps/testing/api/v1/expire-share/$shareId",
$this->getStepLineRef(),
[],
$this->getOcsApiVersion()
);

View File

@ -99,7 +99,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::createLinkShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -145,7 +144,6 @@ class SharingNgContext implements Context {
return GraphHelper::createDriveShareLink(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -180,7 +178,6 @@ class SharingNgContext implements Context {
return GraphHelper::getPermissionsList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -247,7 +244,6 @@ class SharingNgContext implements Context {
$this->featureContext->setResponse(
GraphHelper::getPermissionsList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -329,7 +325,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::sendSharingInvitation(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -398,7 +393,6 @@ class SharingNgContext implements Context {
return GraphHelper::sendSharingInvitationForDrive(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -584,7 +578,6 @@ class SharingNgContext implements Context {
$request = HttpRequestHelper::createRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"POST",
['Content-Type' => 'application/json'],
\json_encode($body)
@ -749,7 +742,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::updateShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -949,7 +941,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::updateShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -990,7 +981,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::setLinkSharePassword(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -1093,7 +1083,6 @@ class SharingNgContext implements Context {
return
GraphHelper::removeAccessToSpaceItem(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$sharer,
$this->featureContext->getPasswordForUser($sharer),
$spaceId,
@ -1132,7 +1121,6 @@ class SharingNgContext implements Context {
return
GraphHelper::removeAccessToSpace(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$sharer,
$this->featureContext->getPasswordForUser($sharer),
$spaceId,
@ -1343,7 +1331,6 @@ class SharingNgContext implements Context {
$body['@UI.Hidden'] = $hide;
return GraphHelper::hideOrUnhideShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($sharee),
$this->featureContext->getPasswordForUser($sharee),
$itemId,
@ -1366,7 +1353,6 @@ class SharingNgContext implements Context {
$itemId = $shareSpaceId . '!' . $shareItemId;
$response = GraphHelper::disableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
@ -1394,7 +1380,6 @@ class SharingNgContext implements Context {
$itemId = $shareSpaceId . '!' . $shareItemId;
$response = GraphHelper::disableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
@ -1489,7 +1474,6 @@ class SharingNgContext implements Context {
$shareSpaceId = GraphHelper::SHARES_SPACE_ID;
$response = GraphHelper::enableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
@ -1514,7 +1498,6 @@ class SharingNgContext implements Context {
$remoteItemId = $this->spacesContext->getSharesRemoteItemId($user, $share);
$response = GraphHelper::enableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$remoteItemId,
@ -1541,7 +1524,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::enableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
@ -1565,7 +1547,6 @@ class SharingNgContext implements Context {
$itemId = $shareSpaceId . '!' . $shareID;
$response = GraphHelper::disableShareSync(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
$itemId,
@ -1585,7 +1566,6 @@ class SharingNgContext implements Context {
$resource = \trim($resource, '/');
$response = GraphHelper::getSharesSharedWithMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -1737,7 +1717,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::getDrivePermissionsList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId
@ -1814,7 +1793,6 @@ class SharingNgContext implements Context {
$this->featureContext->setResponse(
GraphHelper::updateDriveShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -1878,7 +1856,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::setDriveLinkSharePassword(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -1908,7 +1885,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::removeAccessToSpace(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId,
@ -1932,7 +1908,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::getDrivePermissionsList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId
@ -2039,7 +2014,6 @@ class SharingNgContext implements Context {
$response = GraphHelper::getDrivePermissionsList(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$spaceId
@ -2101,8 +2075,7 @@ class SharingNgContext implements Context {
$this->featureContext->getBaseUrl(),
$sharee,
$this->featureContext->getPasswordForUser($sharee),
"",
$this->featureContext->getStepLineRef()
""
);
$driveList = HttpRequestHelper::getJsonDecodedResponseBodyContent($response)->value;
$foundShareMountpoint = false;
@ -2124,7 +2097,6 @@ class SharingNgContext implements Context {
// check share in shared-with-me list
$response = GraphHelper::getSharesSharedWithMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$sharee,
$this->featureContext->getPasswordForUser($sharee)
);

View File

@ -219,8 +219,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$password,
"",
$this->featureContext->getStepLineRef()
""
);
// NOTE: user can be created with empty password
// so if that's the case, the user won't be able to request using empty password
@ -302,7 +301,6 @@ class SpacesContext implements Context {
$credentials = $this->featureContext->graphContext->getAdminOrUserCredentials($user);
$response = GraphHelper::getSharesSharedWithMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password']
);
@ -355,7 +353,6 @@ class SpacesContext implements Context {
return HttpRequestHelper::get(
$fullUrl,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
[],
@ -402,7 +399,6 @@ class SpacesContext implements Context {
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'PROPFIND',
$user,
$this->featureContext->getPasswordForUser($user),
@ -431,7 +427,6 @@ class SpacesContext implements Context {
$this->featureContext->getPasswordForUser($user),
"",
['oc:privatelink'],
$this->featureContext->getStepLineRef(),
"0",
$spaceId,
"files",
@ -543,16 +538,14 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$drive->id,
$this->featureContext->getStepLineRef()
$drive->id
);
}
GraphHelper::deleteSpace(
$this->featureContext->getBaseUrl(),
$userAdmin,
$this->featureContext->getPasswordForUser($userAdmin),
$drive->id,
$this->featureContext->getStepLineRef()
$drive->id
);
}
}
@ -564,7 +557,6 @@ class SpacesContext implements Context {
* @param string $user
* @param string $password
* @param mixed $body
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -576,10 +568,9 @@ class SpacesContext implements Context {
string $user,
string $password,
$body,
string $xRequestId = '',
array $headers = []
): ResponseInterface {
return HttpRequestHelper::post($fullUrl, $xRequestId, $user, $password, $headers, $body);
return HttpRequestHelper::post($fullUrl, $user, $password, $headers, $body);
}
/**
@ -589,7 +580,6 @@ class SpacesContext implements Context {
* @param string $method
* @param string $user
* @param string $password
* @param string $xRequestId
* @param array $headers
*
* @return ResponseInterface
@ -601,10 +591,9 @@ class SpacesContext implements Context {
string $method,
string $user,
string $password,
string $xRequestId = '',
array $headers = []
): ResponseInterface {
return HttpRequestHelper::sendRequest($fullUrl, $xRequestId, $method, $user, $password, $headers);
return HttpRequestHelper::sendRequest($fullUrl, $method, $user, $password, $headers);
}
/**
@ -627,7 +616,6 @@ class SpacesContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$query,
$this->featureContext->getStepLineRef(),
[],
$headers
);
@ -693,8 +681,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$query,
$this->featureContext->getStepLineRef()
$query
);
$this->featureContext->setResponse($response);
}
@ -724,8 +711,7 @@ class SpacesContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$space["id"],
'',
$this->featureContext->getStepLineRef()
''
)
);
}
@ -756,8 +742,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
$this->featureContext->setResponse($response);
if ($response->getStatusCode() === 201) {
@ -782,7 +767,6 @@ class SpacesContext implements Context {
$this->featureContext->getPasswordForUser($user),
$foldersPath,
[],
$this->featureContext->getStepLineRef(),
null,
$spaceId,
'files',
@ -832,7 +816,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
$url,
$this->featureContext->getStepLineRef(),
"PATCH",
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
@ -1554,8 +1537,7 @@ class SpacesContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$spaceId,
$this->featureContext->getStepLineRef()
$spaceId
);
}
@ -1717,8 +1699,7 @@ class SpacesContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$spaceId,
$this->featureContext->getStepLineRef()
$spaceId
);
}
@ -1848,7 +1829,6 @@ class SpacesContext implements Context {
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
);
}
@ -1988,7 +1968,6 @@ class SpacesContext implements Context {
public function moveFilesAndFoldersRequest(string $user, string $fullUrl, array $headers): ResponseInterface {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'MOVE',
$user,
$this->featureContext->getPasswordForUser($user),
@ -2211,7 +2190,6 @@ class SpacesContext implements Context {
public function copyFilesAndFoldersRequest(string $user, string $fullUrl, array $headers): ResponseInterface {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'COPY',
$user,
$this->featureContext->getPasswordForUser($user),
@ -2529,8 +2507,7 @@ class SpacesContext implements Context {
$fullUrl,
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
}
@ -2595,8 +2572,7 @@ class SpacesContext implements Context {
$fullUrl,
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
$responseXmlObject = HttpRequestHelper::getResponseXml($response, __METHOD__);
$sharer = (string) $responseXmlObject->data->uid_owner;
@ -2676,7 +2652,6 @@ class SpacesContext implements Context {
$fullUrl = $this->featureContext->getBaseUrl() . $this->ocsApiUrl . '/' . $shareId;
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"PUT",
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
@ -2708,7 +2683,6 @@ class SpacesContext implements Context {
$permissionID = $this->featureContext->shareNgGetLastCreatedUserGroupShareID();
$response = GraphHelper::updateShare(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$space["id"],
@ -2766,8 +2740,7 @@ class SpacesContext implements Context {
$fullUrl,
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
$responseXmlObject = HttpRequestHelper::getResponseXml($response, __METHOD__);
@ -2894,7 +2867,6 @@ class SpacesContext implements Context {
return HttpRequestHelper::delete(
$fullUrl,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -2942,7 +2914,6 @@ class SpacesContext implements Context {
return HttpRequestHelper::delete(
$fullUrl,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -3007,8 +2978,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$space["id"],
$this->featureContext->getStepLineRef()
$space["id"]
);
}
@ -3098,8 +3068,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$space["id"],
$this->featureContext->getStepLineRef()
$space["id"]
);
}
@ -3142,8 +3111,7 @@ class SpacesContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$space["id"],
$this->featureContext->getStepLineRef()
$space["id"]
);
}
@ -3211,7 +3179,6 @@ class SpacesContext implements Context {
$fullUrl = "$baseUrl/$davPath";
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'PROPFIND',
$user,
$this->featureContext->getPasswordForUser($user)
@ -3261,7 +3228,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'PROPFIND',
$user,
$this->featureContext->getPasswordForUser($user)
@ -3379,7 +3345,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'MOVE',
$user,
$this->featureContext->getPasswordForUser($user),
@ -3425,7 +3390,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
'DELETE',
$user,
$this->featureContext->getPasswordForUser($user),
@ -3474,7 +3438,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$fullUrl,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
)
@ -3802,8 +3765,7 @@ class SpacesContext implements Context {
$fullUrl,
$user,
$this->featureContext->getPasswordForUser($user),
$body,
$this->featureContext->getStepLineRef()
$body
);
$this->featureContext->addToCreatedPublicShares(
@ -4298,7 +4260,6 @@ class SpacesContext implements Context {
$this->featureContext->getPasswordForUser($user),
$resource,
$properties,
$this->featureContext->getStepLineRef(),
$folderDepth,
$spaceId,
"files",
@ -4578,7 +4539,6 @@ class SpacesContext implements Context {
$jsonResponse = GraphHelper::getSharesSharedWithMe(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user)
);
@ -4624,7 +4584,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->archiverContext->getArchiverUrl($queryString),
$this->featureContext->getStepLineRef(),
'',
''
)
@ -4726,7 +4685,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$url,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
)
@ -4792,7 +4750,6 @@ class SpacesContext implements Context {
if ($space === "Shares") {
$itemId = GraphHelper::getShareMountId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$file
@ -4807,7 +4764,6 @@ class SpacesContext implements Context {
$this->featureContext->setResponse(
HttpRequestHelper::get(
$url,
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
)

View File

@ -491,7 +491,6 @@ class SpacesTUSContext implements Context {
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getBaseUrl(),
$resource,
$this->featureContext->getStepLineRef(),
$this->featureContext->getDavPathVersion(),
$spaceId,
)

View File

@ -208,7 +208,6 @@ class TUSContext implements Context {
return HttpRequestHelper::sendRequest(
$resourceLocation,
$this->featureContext->getStepLineRef(),
'PATCH',
$user,
$password,

View File

@ -83,7 +83,6 @@ class TagContext implements Context {
return GraphHelper::createTags(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId,
@ -179,8 +178,7 @@ class TagContext implements Context {
GraphHelper::getTags(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef()
$this->featureContext->getPasswordForUser($user)
)
);
}
@ -246,7 +244,6 @@ class TagContext implements Context {
return GraphHelper::deleteTags(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId,

View File

@ -53,7 +53,6 @@ class TrashbinContext implements Context {
null,
[],
null,
$this->featureContext->getStepLineRef(),
null,
$davPathVersion,
'trash-bin'
@ -158,7 +157,6 @@ class TrashbinContext implements Context {
$this->featureContext->getBaseUrl(),
$user,
$password,
$this->featureContext->getStepLineRef()
);
$suffixPath = $spaceId;
}
@ -169,7 +167,6 @@ class TrashbinContext implements Context {
"",
$depth,
$spaceId,
$this->featureContext->getStepLineRef(),
[
'oc:trashbin-original-filename',
'oc:trashbin-original-location',
@ -244,7 +241,6 @@ class TrashbinContext implements Context {
$collectionPath,
$depth,
null,
$this->featureContext->getStepLineRef(),
[
'oc:trashbin-original-filename',
'oc:trashbin-original-location',
@ -276,8 +272,7 @@ class TrashbinContext implements Context {
$suffixPath = WebDavHelper::getPersonalSpaceIdForUser(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$this->featureContext->getStepLineRef()
$this->featureContext->getPasswordForUser($user)
);
}
$endpoint = WebDavHelper::getDavPath($davPathVersion, $suffixPath, "trash-bin");
@ -429,7 +424,6 @@ class TrashbinContext implements Context {
'oc:trashbin-delete-timestamp',
'd:getlastmodified'
],
$this->featureContext->getStepLineRef(),
'1',
null,
'trash-bin',
@ -683,7 +677,6 @@ class TrashbinContext implements Context {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"DELETE",
$user,
$password
@ -846,8 +839,7 @@ class TrashbinContext implements Context {
$suffixPath = WebDavHelper::getPersonalSpaceIdForUser(
$baseUrl,
$asUser,
$password,
$this->featureContext->getStepLineRef()
$password
);
}
}

View File

@ -217,8 +217,7 @@ trait WebDav {
$spaceId = WebDavHelper::getPersonalSpaceIdForUser(
$this->getBaseUrl(),
$user,
$this->getPasswordForUser($user),
$this->getStepLineRef()
$this->getPasswordForUser($user)
);
}
@ -321,7 +320,6 @@ trait WebDav {
$path,
$headers,
$spaceId,
$this->getStepLineRef(),
$body,
$davPathVersion,
$type,
@ -1098,7 +1096,6 @@ trait WebDav {
$url = "{$this->getBaseUrl()}/$davPath";
$this->response = HttpRequestHelper::sendRequest(
$url,
$this->getStepLineRef(),
"PROPFIND"
);
}
@ -1121,7 +1118,6 @@ trait WebDav {
$password,
$resource,
[],
$this->getStepLineRef(),
"0",
null,
"files",
@ -1440,7 +1436,6 @@ trait WebDav {
$path,
$folderDepth,
$spaceId,
$this->getStepLineRef(),
$properties,
$type,
$this->getDavPathVersion()
@ -1672,7 +1667,6 @@ trait WebDav {
$this->getUserPassword($user),
$source,
$destination,
$this->getStepLineRef(),
$headers,
$this->getDavPathVersion(),
$doChunkUpload,
@ -2155,7 +2149,6 @@ trait WebDav {
$this->getPasswordForUser($user),
$this->acceptanceTestsDirLocation() . $source,
$destination,
$this->getStepLineRef(),
["X-OC-Mtime" => $mtime],
$this->getDavPathVersion(),
false,
@ -2190,7 +2183,6 @@ trait WebDav {
$this->getPasswordForUser($user),
$this->acceptanceTestsDirLocation() . $source,
$destination,
$this->getStepLineRef(),
["X-OC-Mtime" => $mtime],
$this->getDavPathVersion(),
false,
@ -2231,7 +2223,6 @@ trait WebDav {
$password,
$baseUrl,
$resource,
$this->getStepLineRef(),
$this->getDavPathVersion()
)
);
@ -2519,7 +2510,6 @@ trait WebDav {
$fullUrl = "$baseUrl/$davPath/$fileId";
$response = HttpRequestHelper::sendRequest(
$fullUrl,
null,
'DELETE',
$user,
$password
@ -2543,7 +2533,6 @@ trait WebDav {
$fullUrl = "$baseUrl/$sourceDavPath/$fileId";
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$this->getStepLineRef(),
'PUT',
$user,
$this->getPasswordForUser($user),
@ -3776,7 +3765,6 @@ trait WebDav {
$shareMountId = GraphHelper::getShareMountId(
$this->getBaseUrl(),
$this->getStepLineRef(),
$user,
$this->getPasswordForUser($user),
$sharedFolder
@ -3828,7 +3816,6 @@ trait WebDav {
return HttpRequestHelper::sendRequest(
$fullUrl,
$this->getStepLineRef(),
'GET',
$user,
$this->getPasswordForUser($user)
@ -3989,7 +3976,6 @@ trait WebDav {
$this->getPasswordForUser($user),
$path,
$spaceId,
$this->getStepLineRef(),
$this->getDavPathVersion()
);
} catch (Exception $e) {
@ -4012,11 +3998,12 @@ trait WebDav {
/**
* @Then /^user "([^"]*)" (file|folder) "([^"]*)" should have the previously stored id$/
*
* @param string370 $user
* @param string $user
* @param string $fileOrFolder
* @param string $path
*
* @return void
* @throws JsonException
*/
public function userFileShouldHaveStoredId(string $user, string $fileOrFolder, string $path): void {
$user = $this->getActualUsername($user);

View File

@ -99,7 +99,6 @@ class WebDavLockingContext implements Context {
if (isset($fullUrl)) {
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"LOCK",
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
@ -116,7 +115,6 @@ class WebDavLockingContext implements Context {
$file,
$headers,
$spaceId,
$this->featureContext->getStepLineRef(),
$body,
$this->featureContext->getDavPathVersion(),
$type
@ -614,7 +612,6 @@ class WebDavLockingContext implements Context {
$itemToUnlock,
null,
null,
$this->featureContext->getStepLineRef(),
$body,
$this->featureContext->getDavPathVersion()
);
@ -710,7 +707,6 @@ class WebDavLockingContext implements Context {
if (isset($fullUrl)) {
$response = HttpRequestHelper::sendRequest(
$fullUrl,
$this->featureContext->getStepLineRef(),
"UNLOCK",
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
@ -725,7 +721,6 @@ class WebDavLockingContext implements Context {
$itemToUnlock,
$headers,
$spaceId,
$this->featureContext->getStepLineRef(),
null,
$this->featureContext->getDavPathVersion(),
$type

View File

@ -184,7 +184,6 @@ class WebDavPropertiesContext implements Context {
$this->featureContext->getPasswordForUser($username),
$path,
$properties,
$this->featureContext->getStepLineRef(),
$this->featureContext->getDavPathVersion()
);
$this->featureContext->theHTTPStatusCodeShouldBe(207, "", $response);
@ -213,7 +212,6 @@ class WebDavPropertiesContext implements Context {
$this->featureContext->getUserPassword($user),
$path,
$properties,
$this->featureContext->getStepLineRef(),
"0",
null,
"files",
@ -249,7 +247,6 @@ class WebDavPropertiesContext implements Context {
$this->featureContext->getUserPassword($user),
$path,
$properties,
$this->featureContext->getStepLineRef(),
"0",
null,
"files",
@ -325,7 +322,6 @@ class WebDavPropertiesContext implements Context {
$path,
$propertyName,
$propertyValue,
$this->featureContext->getStepLineRef(),
$namespace,
$this->featureContext->getDavPathVersion()
);