From c0c96c0f6abc118b7a8826dbbc9b017d010d2bd0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 6 Feb 2026 05:12:47 +0100 Subject: [PATCH] fix: fix deprecation warnings in FeatureContext (#973) Signed-off-by: Robin Appelman --- tests/acceptance/features/bootstrap/FeatureContext.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/features/bootstrap/FeatureContext.php b/tests/acceptance/features/bootstrap/FeatureContext.php index 60c30c3be..704e38da7 100644 --- a/tests/acceptance/features/bootstrap/FeatureContext.php +++ b/tests/acceptance/features/bootstrap/FeatureContext.php @@ -24,6 +24,8 @@ * Defines application features from the specific context. */ class FeatureContext implements Context { + use JsonAssertions; + /** * list of users that were created on the local server during test runs * key is the lowercase username, value is an array of user attributes @@ -692,7 +694,7 @@ public function theDataOfTheOCSResponseShouldMatch( ): void { $responseAsJson = json_decode($this->response->getBody()->getContents()); $_responseAsJson = $responseAsJson->ocs->data; - JsonAssertions::assertJsonDocumentMatchesSchema( + self::assertJsonDocumentMatchesSchema( $_responseAsJson, $this->getJSONSchema($schemaString) ); @@ -708,7 +710,7 @@ public function theDataOfTheResponseShouldMatch( PyStringNode $schemaString ): void { $_responseAsJson = json_decode($this->response->getBody()->getContents()); - JsonAssertions::assertJsonDocumentMatchesSchema( + self::assertJsonDocumentMatchesSchema( $_responseAsJson, $this->getJSONSchema($schemaString) ); @@ -790,7 +792,7 @@ function ($matches) { $input = str_replace( "%last-created-direct-upload-token%", - $this->directUploadContext->getLastCreatedDirectUploadToken(), + (string)$this->directUploadContext->getLastCreatedDirectUploadToken(), $input ); return $input;