appwrite/tests/e2e/Services/Console/ConsoleConsoleClientTest.php

39 lines
1.4 KiB
PHP
Raw Normal View History

2023-03-31 15:14:59 +00:00
<?php
namespace Tests\E2E\Services\Console;
use Tests\E2E\Client;
use Tests\E2E\Scopes\ProjectConsole;
use Tests\E2E\Scopes\Scope;
use Tests\E2E\Scopes\SideClient;
class ConsoleConsoleClientTest extends Scope
{
use ConsoleBase;
use ProjectConsole;
use SideClient;
public function testGetVariables(): void
{
/**
* Test for SUCCESS
*/
$response = $this->client->call(Client::METHOD_GET, '/console/variables', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
2023-08-23 01:35:00 +00:00
], $this->getHeaders()));
2023-03-31 15:14:59 +00:00
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertCount(9, $response['body']);
2023-03-31 15:14:59 +00:00
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
$this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']);
$this->assertIsInt($response['body']['_APP_COMPUTE_SIZE_LIMIT']);
2023-03-31 15:14:59 +00:00
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
2023-08-30 05:10:08 +00:00
$this->assertIsBool($response['body']['_APP_DOMAIN_ENABLED']);
2023-08-23 01:35:00 +00:00
$this->assertIsBool($response['body']['_APP_VCS_ENABLED']);
$this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']);
2024-11-20 09:16:04 +00:00
$this->assertIsString($response['body']['_APP_DOMAIN_SITES']);
$this->assertIsString($response['body']['_APP_OPTIONS_FORCE_HTTPS']);
2023-03-31 15:14:59 +00:00
}
}