Fix tests

This commit is contained in:
Matej Bačo
2025-03-09 15:42:17 +01:00
parent 254018071a
commit 4e1168654d
6 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="true"
stopOnFailure="false"
>
<extensions>
<extension class="Appwrite\Tests\TestHook" />
@@ -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',
@@ -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',
@@ -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',
@@ -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',
+2 -2
View File
@@ -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;
}