mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
test: fix PROPFIND shares space tests
This commit is contained in:
@@ -116,6 +116,7 @@ class GraphHelper {
|
||||
public static function getEtagRegex(): string {
|
||||
return "^\\\"[a-f0-9:.]{1,32}\\\"$";
|
||||
}
|
||||
|
||||
/**
|
||||
* Federated users have a base64 encoded string of {remoteid}@{provider} as their id
|
||||
* This regex matches only non empty base64 encoded strings
|
||||
@@ -126,6 +127,19 @@ class GraphHelper {
|
||||
return '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $pattern
|
||||
*
|
||||
* @return string regex pattern
|
||||
*/
|
||||
public static function sanitizeRegexPattern(string $pattern): string {
|
||||
$pattern = \str_replace("\\\\", "\\", $pattern);
|
||||
$pattern = \str_replace("/", "\/", $pattern);
|
||||
$pattern = \preg_replace('/^\^/', '', $pattern);
|
||||
$pattern = \preg_replace('/\$$/', '', $pattern);
|
||||
return "/^$pattern$/";
|
||||
}
|
||||
|
||||
/**
|
||||
* Key name can consist of @@@
|
||||
* This function separate such key and return its actual value from actual drive response which can be used for assertion
|
||||
|
||||
Reference in New Issue
Block a user