From 4e1168654d95833358018fc9759d8af051e3663a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Sun, 9 Mar 2025 15:42:17 +0100 Subject: [PATCH] Fix tests --- phpunit.xml | 2 +- .../Platform/Modules/Functions/Http/Templates/Get.php | 2 +- .../Platform/Modules/Functions/Http/Templates/XList.php | 2 +- src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php | 2 +- src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php | 2 +- tests/e2e/Services/Sites/SitesBase.php | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index 598b730908..4c4e55ea4e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -6,7 +6,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="true" + stopOnFailure="false" > diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php b/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php index b24ec43f99..542dfb3eb6 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Templates/Get.php @@ -30,7 +30,7 @@ class Get extends Base ->setHttpPath('/v1/functions/templates/:templateId') ->desc('Get function template') ->groups(['api', 'functions']) - ->label('scope', 'functions.read') + ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('sdk', new Method( namespace: 'functions', diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php b/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php index 6e999d990f..de773ae75e 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Templates/XList.php @@ -31,7 +31,7 @@ class XList extends Base ->setHttpPath('/v1/functions/templates') ->desc('List templates') ->groups(['api', 'functions']) - ->label('scope', 'functions.read') + ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_FUNCTIONS) ->label('sdk', new Method( namespace: 'functions', diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php b/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php index 95eb5d5050..272caa5d81 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Templates/Get.php @@ -30,7 +30,7 @@ class Get extends Base ->setHttpPath('/v1/sites/templates/:templateId') ->desc('Get site template') ->groups(['api', 'sites']) - ->label('scope', 'sites.read') + ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_SITES) ->label('sdk', new Method( namespace: 'sites', diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php b/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php index a09b71f1a5..1e8f4de49a 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Templates/XList.php @@ -31,7 +31,7 @@ class XList extends Base ->setHttpPath('/v1/sites/templates') ->desc('List templates') ->groups(['api', 'sites']) - ->label('scope', 'sites.read') + ->label('scope', 'public') ->label('resourceType', RESOURCE_TYPE_SITES) ->label('sdk', new Method( namespace: 'sites', diff --git a/tests/e2e/Services/Sites/SitesBase.php b/tests/e2e/Services/Sites/SitesBase.php index d7a90df311..abfce68d89 100644 --- a/tests/e2e/Services/Sites/SitesBase.php +++ b/tests/e2e/Services/Sites/SitesBase.php @@ -299,10 +299,10 @@ trait SitesBase protected function getTemplate(string $templateId) { - $template = $this->client->call(Client::METHOD_GET, '/sites/templates/' . $templateId, array_merge([ + $template = $this->client->call(Client::METHOD_GET, '/sites/templates/' . $templateId, [ 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders())); + ]); return $template; }