appwrite/tests/e2e/Services/Health/HealthBase.php

28 lines
666 B
PHP
Raw Normal View History

2020-01-12 15:20:51 +00:00
<?php
namespace Tests\E2E\Services\Health;
2026-01-01 09:54:13 +00:00
use Tests\E2E\Client;
use Tests\E2E\Scopes\ProjectCustom;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideServer;
abstract class HealthBase extends Scope
2020-01-12 15:20:51 +00:00
{
2026-01-01 09:54:13 +00:00
use ProjectCustom;
use SideServer;
protected function getProjectId(): string
{
return $this->getProject()['$id'];
}
protected function callGet(string $path, array $query = []): array
{
return $this->client->call(Client::METHOD_GET, $path, \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProjectId(),
], $this->getHeaders()), $query);
}
2022-05-23 14:54:50 +00:00
}