removing without skeleton files string from the user creation steps

This commit is contained in:
Niraj Acharya
2024-12-02 09:12:57 +05:45
parent a265fcbe46
commit c98841904d
219 changed files with 663 additions and 804 deletions
@@ -405,53 +405,4 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$localContent = (string)$localContent->data->element->contentUrlEncoded;
return \urldecode($localContent);
}
/**
* returns the content of a file in a skeleton folder
*
* @param string|null $fileInSkeletonFolder
* @param string|null $xRequestId
* @param string|null $baseUrl
* @param string|null $adminUsername
* @param string|null $adminPassword
*
* @return string content of the file
* @throws GuzzleException
* @throws Exception
*/
public static function readSkeletonFile(
?string $fileInSkeletonFolder,
?string $xRequestId = '',
?string $baseUrl = null,
?string $adminUsername = null,
?string $adminPassword = null
):string {
$baseUrl = self::checkBaseUrl($baseUrl, "readSkeletonFile");
$adminUsername = self::checkAdminUsername(
$adminUsername,
"readSkeletonFile"
);
$adminPassword = self::checkAdminPassword(
$adminPassword,
"readSkeletonFile"
);
$fileInSkeletonFolder = \rawurlencode("/$fileInSkeletonFolder");
$response = OcsApiHelper::sendRequest(
$baseUrl,
$adminUsername,
$adminPassword,
'GET',
"/apps/testing/api/v1/file?file=$fileInSkeletonFolder&absolute=true",
$xRequestId
);
self::assertSame(
200,
$response->getStatusCode(),
"Failed to read the file $fileInSkeletonFolder"
);
$localContent = HttpRequestHelper::getResponseXml($response, __METHOD__);
$localContent = (string)$localContent->data->element->contentUrlEncoded;
return \urldecode($localContent);
}
}