mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-30 07:49:41 -05:00
Use triats in correct way (#6430)
This commit is contained in:
@@ -52,6 +52,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
use Provisioning;
|
||||
use Sharing;
|
||||
use WebDav;
|
||||
use JsonAssertions;
|
||||
|
||||
/**
|
||||
* Unix timestamp seconds
|
||||
@@ -1360,7 +1361,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
PyStringNode $schemaString
|
||||
): void {
|
||||
$jsonResponse = $this->getJsonDecodedResponseBodyContent();
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->assertJsonDocumentMatchesSchema(
|
||||
$jsonResponse->ocs->data,
|
||||
$this->getJSONSchema($schemaString)
|
||||
);
|
||||
@@ -1377,7 +1378,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
*/
|
||||
public function theDataOfTheResponseShouldMatch(PyStringNode $schemaString): void {
|
||||
$responseBody = $this->getJsonDecodedResponseBodyContent();
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->assertJsonDocumentMatchesSchema(
|
||||
$responseBody,
|
||||
$this->getJSONSchema($schemaString)
|
||||
);
|
||||
|
||||
@@ -13,7 +13,6 @@ use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use Behat\Gherkin\Node\PyStringNode;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Helmich\JsonAssert\JsonAssertions;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\GraphHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
@@ -2035,7 +2034,7 @@ class GraphContext implements Context {
|
||||
!$shouldContain && $userOrGroupFound,
|
||||
'Response contains user or group "' . $userOrGroup . '" but should not have.'
|
||||
);
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->featureContext->assertJsonDocumentMatchesSchema(
|
||||
$responseBody,
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
@@ -2371,7 +2370,7 @@ class GraphContext implements Context {
|
||||
"Response does not contain event type '" . $eventType . "'."
|
||||
);
|
||||
}
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->featureContext->assertJsonDocumentMatchesSchema(
|
||||
$actualResponseToAssert,
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
@@ -2393,7 +2392,7 @@ class GraphContext implements Context {
|
||||
"Response does not contain key 'user'"
|
||||
);
|
||||
}
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->featureContext->assertJsonDocumentMatchesSchema(
|
||||
$actualResponseToAssert->user,
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
|
||||
@@ -10,7 +10,6 @@ use Behat\Behat\Context\Context;
|
||||
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use TestHelpers\OcsApiHelper;
|
||||
use Behat\Gherkin\Node\PyStringNode;
|
||||
use Helmich\JsonAssert\JsonAssertions;
|
||||
use TestHelpers\EmailHelper;
|
||||
use PHPUnit\Framework\Assert;
|
||||
use TestHelpers\GraphHelper;
|
||||
@@ -152,7 +151,7 @@ class NotificationContext implements Context {
|
||||
null,
|
||||
$this->getUserRecipient(),
|
||||
);
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->featureContext->assertJsonDocumentMatchesSchema(
|
||||
$responseBody,
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
|
||||
@@ -27,7 +27,6 @@ use Behat\Behat\Hook\Scope\BeforeScenarioScope;
|
||||
use Behat\Gherkin\Node\PyStringNode;
|
||||
use Behat\Gherkin\Node\TableNode;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Helmich\JsonAssert\JsonAssertions;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use TestHelpers\HttpRequestHelper;
|
||||
use TestHelpers\WebDavHelper;
|
||||
@@ -921,7 +920,7 @@ class SpacesContext implements Context {
|
||||
$userName,
|
||||
);
|
||||
|
||||
JsonAssertions::assertJsonDocumentMatchesSchema(
|
||||
$this->featureContext->assertJsonDocumentMatchesSchema(
|
||||
$responseBody,
|
||||
$this->featureContext->getJSONSchema($schemaString)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user