Skip to content

Commit

Permalink
check by vardump
Browse files Browse the repository at this point in the history
Signed-off-by: nabim777 <[email protected]>
  • Loading branch information
nabim777 committed Oct 21, 2024
1 parent 9ad1fb1 commit 923c0f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/acceptance/features/api/directUpload.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Feature: API endpoint for direct upload
}
"""
And the content of file at "<file-name>" for user "Carol" should be "some data"
Examples:
| valid-file-name | file-name | pattern |
| textfile0.txt | textfile0.txt | textfile0\\.txt |
| असजिलो file | असजिलो file | असजिलो file |
| ?&$%?§ file.txt | ?&$%?§ file.txt | \\?\\&\\$\\%\\?§ file\\.txt |
| ../textfile.txt | textfile.txt | textfile\\.txt |
| folder/testfile.txt | testfile.txt | testfile\\.txt |
| text\file.txt | file.txt | file\\.txt |
Examples:
| valid-file-name | file-name | pattern |
| textfile0.txt | textfile0.txt | textfile0\\.txt |
| असजिलो file | असजिलो file | असजिलो file |
| ?&$%?§ file.txt | ?&$%?§ file.txt | \\?\\&\\$\\%\\?§ file\\.txt |
| ../textfile.txt | textfile.txt | textfile\\.txt |
| folder/testfile.txt | testfile.txt | testfile\\.txt |
| text\file.txt | file.txt | file\\.txt |


Scenario: Send an invalid filename to the direct-upload endpoint
Expand Down
3 changes: 3 additions & 0 deletions tests/acceptance/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ private function getJSONSchema(PyStringNode $schemaString) {
$schemaRawString = $schemaString->getRaw();
$schemaRawString = $this->replaceInlineCodes($schemaRawString);
$schema = json_decode($schemaRawString);
echo("-----------\n");
print_r($schema);
Assert::assertNotNull($schema, 'schema is not valid JSON');
return $schema;
}
Expand Down Expand Up @@ -570,6 +572,7 @@ public function theDataOfTheResponseShouldMatch(
PyStringNode $schemaString
): void {
$_responseAsJson = json_decode($this->response->getBody()->getContents());
print_r($_responseAsJson);
JsonAssertions::assertJsonDocumentMatchesSchema(
$_responseAsJson,
$this->getJSONSchema($schemaString)
Expand Down

0 comments on commit 923c0f7

Please sign in to comment.