Skip to content

Commit

Permalink
tests: more checks
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Dec 9, 2024
1 parent c6859cc commit ad2e310
Show file tree
Hide file tree
Showing 3 changed files with 457 additions and 152 deletions.
9 changes: 8 additions & 1 deletion tests/acceptance/TestHelpers/GraphHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ public static function getEtagRegex(): string {
* @return string
*/
public static function getFederatedUserRegex(): string {
return '^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$';
return '(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$';
}

/**
* @return string
*/
public static function getFederatedFileIdRegex(): string {
return self::getSpaceIdRegex() . '!(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}';
}

/**
Expand Down
8 changes: 8 additions & 0 deletions tests/acceptance/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,14 @@ public function substituteInLineCodes(
],
"parameter" => []
],
[
"code" => "%federated_file_id_pattern%",
"function" => [
__NAMESPACE__ . '\TestHelpers\GraphHelper',
"getFederatedFileIdRegex"
],
"parameter" => []
],
[
"code" => "%group_id_pattern%",
"function" => [
Expand Down
Loading

0 comments on commit ad2e310

Please sign in to comment.