Removed method isTestingOnOcis, and refactored code
This commit is contained in:
@@ -2961,15 +2961,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function theFileWithContentShouldExistInTheServerRoot(string $path, string $content): void {
|
||||
if (OcisHelper::isTestingOnOcis()) {
|
||||
$fileContent = $this->readFileInServerRootForOCIS($path);
|
||||
} else {
|
||||
$this->readFileInServerRootForCore($path);
|
||||
$this->theHTTPStatusCodeShouldBe(200, 'Failed to read the file $path');
|
||||
$fileContent = $this->getResponseXml();
|
||||
$fileContent = (string)$fileContent->data->element->contentUrlEncoded;
|
||||
$fileContent = \urldecode($fileContent);
|
||||
}
|
||||
$fileContent = $this->readFileInServerRootForOCIS($path);
|
||||
Assert::assertSame(
|
||||
$content,
|
||||
$fileContent,
|
||||
|
||||
Reference in New Issue
Block a user