1
0
Fork 0
mirror of synced 2024-09-08 05:42:15 +12:00
appwrite/tests/e2e/Services/Console/ConsoleConsoleClientTest.php

37 lines
1.2 KiB
PHP
Raw Normal View History

2023-04-01 04:14:59 +13: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 13:35:00 +12:00
], $this->getHeaders()));
2023-04-01 04:14:59 +13:00
$this->assertEquals(200, $response['headers']['status-code']);
2023-08-30 17:10:08 +12:00
$this->assertCount(7, $response['body']);
2023-04-01 04:14:59 +13:00
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
$this->assertIsInt($response['body']['_APP_STORAGE_LIMIT']);
$this->assertIsInt($response['body']['_APP_FUNCTIONS_SIZE_LIMIT']);
$this->assertIsString($response['body']['_APP_DOMAIN_TARGET']);
2023-08-30 17:10:08 +12:00
$this->assertIsBool($response['body']['_APP_DOMAIN_ENABLED']);
2023-08-23 13:35:00 +12:00
$this->assertIsBool($response['body']['_APP_VCS_ENABLED']);
$this->assertIsBool($response['body']['_APP_ASSISTANT_ENABLED']);
2023-04-01 04:14:59 +13:00
}
}