Removed occ related codes

This commit is contained in:
Prarup Gurung
2023-03-21 09:21:01 +05:45
parent 7ed88edc57
commit 8b93c1b8f6
6 changed files with 1 additions and 377 deletions
+1 -28
View File
@@ -464,16 +464,7 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
"readSkeletonFile"
);
//find the absolute path of the currently set skeletondirectory
$occResponse = ['code' => '', 'stdOut' => '', 'stdErr' => '' ];
if ((int) $occResponse['code'] !== 0) {
throw new \Exception(
"could not get current skeletondirectory. " . $occResponse['stdErr']
);
}
$skeletonRoot = \trim($occResponse['stdOut']);
$fileInSkeletonFolder = \rawurlencode("$skeletonRoot/$fileInSkeletonFolder");
$fileInSkeletonFolder = \rawurlencode("/$fileInSkeletonFolder");
$response = OcsApiHelper::sendRequest(
$baseUrl,
$adminUsername,
@@ -492,22 +483,4 @@ class SetupHelper extends \PHPUnit\Framework\Assert {
$localContent = \urldecode($localContent);
return $localContent;
}
/**
* Finds all lines containing the given text
*
* @param string|null $input stdout or stderr output
* @param string|null $text text to search for
*
* @return array array of lines that matched
*/
public static function findLines(?string $input, ?string $text):array {
$results = [];
foreach (\explode("\n", $input) as $line) {
if (\strpos($line, $text) !== false) {
$results[] = $line;
}
}
return $results;
}
}