removing without skeleton files string from the user creation steps
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user