mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
rename App:: to Http::
This commit is contained in:
@@ -21,7 +21,7 @@ class AbuseTest extends Scope
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
if (App::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
|
||||
if (Http::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
|
||||
$this->markTestSkipped('Abuse is not enabled.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class AbuseTest extends Scope
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
if (App::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
|
||||
if (Http::getEnv('_APP_OPTIONS_ABUSE') === 'disabled') {
|
||||
$this->markTestSkipped('Abuse is not enabled.');
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class AbuseTest extends Scope
|
||||
'x-appwrite-project' => $projectId,
|
||||
], $this->getHeaders()), $graphQLPayload);
|
||||
|
||||
$max = App::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 250);
|
||||
$max = Http::getEnv('_APP_GRAPHQL_MAX_QUERY_COMPLEXITY', 250);
|
||||
|
||||
$this->assertEquals('Max query complexity should be ' . $max . ' but got 259.', $response['body']['errors'][0]['message']);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ class AbuseTest extends Scope
|
||||
public function testTooManyQueriesBlocked()
|
||||
{
|
||||
$projectId = $this->getProject()['$id'];
|
||||
$maxQueries = App::getEnv('_APP_GRAPHQL_MAX_QUERIES', 10);
|
||||
$maxQueries = Http::getEnv('_APP_GRAPHQL_MAX_QUERIES', 10);
|
||||
|
||||
$query = [];
|
||||
for ($i = 0; $i <= $maxQueries + 1; $i++) {
|
||||
|
||||
@@ -14,8 +14,8 @@ class EventTest extends TestCase
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$redisHost = App::getEnv('_APP_REDIS_HOST', '');
|
||||
$redisPort = App::getEnv('_APP_REDIS_PORT', '');
|
||||
$redisHost = Http::getEnv('_APP_REDIS_HOST', '');
|
||||
$redisPort = Http::getEnv('_APP_REDIS_PORT', '');
|
||||
\Resque::setBackend($redisHost . ':' . $redisPort);
|
||||
|
||||
$this->queue = 'v1-tests' . uniqid();
|
||||
|
||||
@@ -15,8 +15,8 @@ class StatsTest extends TestCase
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$host = App::getEnv('_APP_STATSD_HOST', 'telegraf');
|
||||
$port = App::getEnv('_APP_STATSD_PORT', 8125);
|
||||
$host = Http::getEnv('_APP_STATSD_HOST', 'telegraf');
|
||||
$port = Http::getEnv('_APP_STATSD_PORT', 8125);
|
||||
|
||||
$connection = new \Domnikl\Statsd\Connection\UdpSocket($host, $port);
|
||||
$statsd = new \Domnikl\Statsd\Client($connection);
|
||||
|
||||
Reference in New Issue
Block a user